mirror of https://github.com/axmolengine/axmol.git
remove PhoneDirect3DXamlAppComponent namespace. Updated edit text code
This commit is contained in:
parent
b7fd0dd722
commit
4596417a0b
|
@ -16,7 +16,6 @@ using System.Windows.Media;
|
||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
using Microsoft.Phone.Controls;
|
using Microsoft.Phone.Controls;
|
||||||
using PhoneDirect3DXamlAppComponent;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -27,7 +26,7 @@ using Microsoft.Phone.Info;
|
||||||
using Windows.Graphics.Display;
|
using Windows.Graphics.Display;
|
||||||
using Microsoft.Phone.Tasks;
|
using Microsoft.Phone.Tasks;
|
||||||
|
|
||||||
namespace PhoneDirect3DXamlAppInterop
|
namespace cocos2d
|
||||||
{
|
{
|
||||||
public partial class MainPage : PhoneApplicationPage
|
public partial class MainPage : PhoneApplicationPage
|
||||||
{
|
{
|
||||||
|
@ -141,13 +140,15 @@ namespace PhoneDirect3DXamlAppInterop
|
||||||
|
|
||||||
public void OnKeyUp(object sender, KeyEventArgs e)
|
public void OnKeyUp(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
m_d3dInterop.OnCocos2dKeyEvent(Cocos2dKeyEvent.Text, m_textBox.Text);
|
|
||||||
m_textBox.Text = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnTextChanged(object sender, TextChangedEventArgs e)
|
public void OnTextChanged(object sender, TextChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (m_textBox.Text.Length > 0)
|
||||||
{
|
{
|
||||||
m_d3dInterop.OnCocos2dKeyEvent(Cocos2dKeyEvent.Text, m_textBox.Text);
|
m_d3dInterop.OnCocos2dKeyEvent(Cocos2dKeyEvent.Text, m_textBox.Text);
|
||||||
|
m_textBox.Text = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called by the Cocos2d-x C++ engine to display a MessageBox
|
// Called by the Cocos2d-x C++ engine to display a MessageBox
|
||||||
|
@ -181,7 +182,6 @@ namespace PhoneDirect3DXamlAppInterop
|
||||||
m_textBox.TextChanged += OnTextChanged;
|
m_textBox.TextChanged += OnTextChanged;
|
||||||
DrawingSurfaceBackground.Children.Add(m_textBox);
|
DrawingSurfaceBackground.Children.Add(m_textBox);
|
||||||
}
|
}
|
||||||
m_textBox.Text = text;
|
|
||||||
m_textBox.SelectionLength = 0;
|
m_textBox.SelectionLength = 0;
|
||||||
m_textBox.SelectionStart = int.MaxValue;
|
m_textBox.SelectionStart = int.MaxValue;
|
||||||
m_textBox.Focus();
|
m_textBox.Focus();
|
||||||
|
|
Loading…
Reference in New Issue