Fix textbox caret showing on empty string.
This commit is contained in:
@@ -1203,7 +1203,7 @@ namespace FlaxEngine.GUI
|
|||||||
if (base.OnMouseDown(location, button))
|
if (base.OnMouseDown(location, button))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (button == MouseButton.Left && _text.Length > 0 && _isSelectable)
|
if (button == MouseButton.Left && _isSelectable)
|
||||||
{
|
{
|
||||||
Focus();
|
Focus();
|
||||||
OnSelectingBegin();
|
OnSelectingBegin();
|
||||||
@@ -1219,6 +1219,10 @@ namespace FlaxEngine.GUI
|
|||||||
else
|
else
|
||||||
SetSelection(_selectionStart, hitPos);
|
SetSelection(_selectionStart, hitPos);
|
||||||
}
|
}
|
||||||
|
else if (string.IsNullOrEmpty(_text))
|
||||||
|
{
|
||||||
|
SetSelection(0);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetSelection(hitPos);
|
SetSelection(hitPos);
|
||||||
|
|||||||
Reference in New Issue
Block a user