diff --git a/Source/Engine/UI/GUI/Common/TextBoxBase.cs b/Source/Engine/UI/GUI/Common/TextBoxBase.cs
index 2e4ef51e3..162e220d7 100644
--- a/Source/Engine/UI/GUI/Common/TextBoxBase.cs
+++ b/Source/Engine/UI/GUI/Common/TextBoxBase.cs
@@ -279,10 +279,11 @@ namespace FlaxEngine.GUI
}
///
- /// Sets the text.
+ /// Sets the text (forced, even if user is editing it).
///
/// The value.
- protected void SetText(string value)
+ [NoAnimate]
+ public void SetText(string value)
{
// Prevent from null problems
if (value == null)
@@ -314,6 +315,18 @@ namespace FlaxEngine.GUI
}
}
+ ///
+ /// Sets the text as it was entered by user (focus, change value, defocus).
+ ///
+ /// The value.
+ [NoAnimate]
+ public void SetTextAsUser(string value)
+ {
+ Focus();
+ SetText(value);
+ Defocus();
+ }
+
///
/// Gets length of the text
///
@@ -1000,7 +1013,8 @@ namespace FlaxEngine.GUI
///
public override void OnMouseMove(Vector2 location)
{
- // Check if user is selecting
+ base.OnMouseMove(location);
+
if (_isSelecting)
{
// Find char index at current mouse location
@@ -1014,6 +1028,9 @@ namespace FlaxEngine.GUI
///
public override bool OnMouseDown(Vector2 location, MouseButton button)
{
+ if (base.OnMouseDown(location, button))
+ return true;
+
if (button == MouseButton.Left && _text.Length > 0)
{
Focus();
@@ -1050,6 +1067,9 @@ namespace FlaxEngine.GUI
///
public override bool OnMouseUp(Vector2 location, MouseButton button)
{
+ if (base.OnMouseUp(location, button))
+ return true;
+
if (button == MouseButton.Left)
{
OnSelectingEnd();
@@ -1079,6 +1099,8 @@ namespace FlaxEngine.GUI
///
public override bool OnCharInput(char c)
{
+ if (base.OnCharInput(c))
+ return true;
Insert(c);
return true;
}