Add Tab navigation for Editor UI
This commit is contained in:
@@ -78,8 +78,6 @@ namespace FlaxEditor.GUI.Input
|
||||
if (_value != value)
|
||||
{
|
||||
_value = value;
|
||||
|
||||
// Fire event
|
||||
OnValueChanged();
|
||||
}
|
||||
}
|
||||
@@ -128,16 +126,24 @@ namespace FlaxEditor.GUI.Input
|
||||
var r = new Rectangle(2, 2, Width - 4, Height - 4);
|
||||
|
||||
Render2D.FillRectangle(r, _value);
|
||||
Render2D.DrawRectangle(r, IsMouseOver ? style.BackgroundSelected : Color.Black);
|
||||
Render2D.DrawRectangle(r, IsMouseOver || IsNavFocused ? style.BackgroundSelected : Color.Black);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool OnMouseUp(Vector2 location, MouseButton button)
|
||||
{
|
||||
Focus();
|
||||
OnSubmit();
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnSubmit()
|
||||
{
|
||||
base.OnSubmit();
|
||||
|
||||
// Show color picker dialog
|
||||
_currentDialog = ShowPickColorDialog?.Invoke(this, _value, OnColorChanged, OnPickerClosed);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void OnColorChanged(Color color, bool sliding)
|
||||
|
||||
Reference in New Issue
Block a user