@@ -370,7 +370,7 @@ namespace FlaxEngine.GUI
|
|||||||
{
|
{
|
||||||
Focus();
|
Focus();
|
||||||
SetText(value);
|
SetText(value);
|
||||||
Defocus();
|
RemoveFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -907,6 +907,14 @@ namespace FlaxEngine.GUI
|
|||||||
return HitTestText(location);
|
return HitTestText(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RemoveFocus()
|
||||||
|
{
|
||||||
|
if (Parent != null)
|
||||||
|
Parent.Focus();
|
||||||
|
else
|
||||||
|
Defocus();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Calculates total text size. Called by <see cref="OnTextChanged"/> to cache the text size.
|
/// Calculates total text size. Called by <see cref="OnTextChanged"/> to cache the text size.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1297,7 +1305,7 @@ namespace FlaxEngine.GUI
|
|||||||
_text = _onStartEditValue;
|
_text = _onStartEditValue;
|
||||||
|
|
||||||
if (!IsNavFocused)
|
if (!IsNavFocused)
|
||||||
Defocus();
|
RemoveFocus();
|
||||||
OnTextChanged();
|
OnTextChanged();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -1311,7 +1319,7 @@ namespace FlaxEngine.GUI
|
|||||||
else if (!IsNavFocused)
|
else if (!IsNavFocused)
|
||||||
{
|
{
|
||||||
// End editing
|
// End editing
|
||||||
Defocus();
|
RemoveFocus();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case KeyboardKeys.Home:
|
case KeyboardKeys.Home:
|
||||||
|
|||||||
Reference in New Issue
Block a user