Added an event to subscribe to in TextBoxBase that gets fired when a key is down.
This commit is contained in:
@@ -129,6 +129,11 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
public event Action<TextBoxBase> TextBoxEditEnd;
|
||||
|
||||
/// <summary>
|
||||
/// Event fired when a key is down.
|
||||
/// </summary>
|
||||
public event Action<KeyboardKeys> KeyDown;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this is a multiline text box control.
|
||||
/// </summary>
|
||||
@@ -1174,6 +1179,7 @@ namespace FlaxEngine.GUI
|
||||
var window = Root;
|
||||
bool shiftDown = window.GetKey(KeyboardKeys.Shift);
|
||||
bool ctrDown = window.GetKey(KeyboardKeys.Control);
|
||||
KeyDown?.Invoke(key);
|
||||
|
||||
switch (key)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user