Added KeyUp event in TextBoxBase

This commit is contained in:
Chandler Cox
2022-10-24 14:11:34 -05:00
parent 616379c54b
commit a79b642613

View File

@@ -134,6 +134,11 @@ namespace FlaxEngine.GUI
/// </summary> /// </summary>
public event Action<KeyboardKeys> KeyDown; public event Action<KeyboardKeys> KeyDown;
/// <summary>
/// Event fired when a key is up.
/// </summary>
public event Action<KeyboardKeys> KeyUp;
/// <summary> /// <summary>
/// Gets or sets a value indicating whether this is a multiline text box control. /// Gets or sets a value indicating whether this is a multiline text box control.
/// </summary> /// </summary>
@@ -1173,6 +1178,13 @@ namespace FlaxEngine.GUI
return true; return true;
} }
/// <inheritdoc />
public override void OnKeyUp(KeyboardKeys key)
{
base.OnKeyUp(key);
KeyUp?.Invoke(key);
}
/// <inheritdoc /> /// <inheritdoc />
public override bool OnKeyDown(KeyboardKeys key) public override bool OnKeyDown(KeyboardKeys key)
{ {