summaryrefslogtreecommitdiff
path: root/Assets
diff options
context:
space:
mode:
Diffstat (limited to 'Assets')
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs2
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/InputField.cs24
2 files changed, 15 insertions, 11 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs
index 200b4e5..6690060 100644
--- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs
@@ -185,7 +185,7 @@ namespace UnityEngine.UI
// �������ﲼ�ֺ����񡢲��ʶ�������ϣ�����canvas����Ⱦ
- // profiler���ù�
+ // profiler
UISystemProfilerApi.EndSample(UISystemProfilerApi.SampleType.Layout);
}
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/InputField.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/InputField.cs
index ef6afa4..ed39020 100644
--- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/InputField.cs
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/UIControls/InputField.cs
@@ -563,6 +563,7 @@ namespace UnityEngine.UI
if (m_CachedInputRenderer != null)
m_CachedInputRenderer.SetMaterial(m_TextComponent.GetModifiedMaterial(Graphic.defaultGraphicMaterial), Texture2D.whiteTexture);
+ //c ��Text���ע���¼���������Ҫ��Graphic���ж�������ʵ��ؽ����ʱ��ִ����Ӧ�ļ����¼�
if (m_TextComponent != null)
{
m_TextComponent.RegisterDirtyVerticesCallback(MarkGeometryAsDirty);
@@ -787,10 +788,11 @@ namespace UnityEngine.UI
return;
}
+ //��ȡ������Ϣ
string val = m_Keyboard.text;
-
if (m_Text != val)
{
+ //ֻ��������޷��ı���������
if (m_ReadOnly)
{
m_Keyboard.text = m_Text;
@@ -805,12 +807,12 @@ namespace UnityEngine.UI
if (c == '\r' || (int)c == 3)
c = '\n';
-
+ //��֤��������
if (onValidateInput != null)
c = onValidateInput(m_Text, m_Text.Length, c);
else if (characterValidation != CharacterValidation.None)
- c = Validate(m_Text, m_Text.Length, c);
-
+ c = Validate(m_Text, m_Text.Length, c);
+ //������ʱ�����ڻ��������ֹͣ����
if (lineType == LineType.MultiLineSubmit && c == '\n')
{
m_Keyboard.text = m_Text;
@@ -821,8 +823,8 @@ namespace UnityEngine.UI
if (c != 0)
m_Text += c;
- }
-
+ }
+ //�������Ƶ���������и�
if (characterLimit > 0 && m_Text.Length > characterLimit)
m_Text = m_Text.Substring(0, characterLimit);
@@ -839,16 +841,16 @@ namespace UnityEngine.UI
// and update label will take the old value from keyboard if we don't change it here
if (m_Text != val)
m_Keyboard.text = m_Text;
-
+ //ִ���¼��������ı���ʾ
SendOnValueChangedAndUpdateLabel();
}
}
else if (m_Keyboard.canGetSelection)
{
UpdateCaretFromKeyboard();
- }
-
-
+ }
+
+ //�������������ʱ��ִ��Deselect,��رռ��̲�ִ�б༭��ɵ��¼�
if (m_Keyboard.done)
{
if (m_Keyboard.wasCanceled)
@@ -1629,6 +1631,7 @@ namespace UnityEngine.UI
Insert(input);
}
+ // ������ʾ�����漰ֵ����������������Ϊ��������ʱ����ʾΪ*
/// <summary>
/// Update the visual text Text.
/// </summary>
@@ -2219,6 +2222,7 @@ namespace UnityEngine.UI
{
if (m_Keyboard != null && !m_Keyboard.active)
{
+ //������̽ӿ�,������ǰ��������ý����̽ӿ���
m_Keyboard.active = true;
m_Keyboard.text = m_Text;
}