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>
|
/// </summary>
|
||||||
public event Action<TextBoxBase> TextBoxEditEnd;
|
public event Action<TextBoxBase> TextBoxEditEnd;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Event fired when a key is down.
|
||||||
|
/// </summary>
|
||||||
|
public event Action<KeyboardKeys> KeyDown;
|
||||||
|
|
||||||
/// <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>
|
||||||
@@ -1174,6 +1179,7 @@ namespace FlaxEngine.GUI
|
|||||||
var window = Root;
|
var window = Root;
|
||||||
bool shiftDown = window.GetKey(KeyboardKeys.Shift);
|
bool shiftDown = window.GetKey(KeyboardKeys.Shift);
|
||||||
bool ctrDown = window.GetKey(KeyboardKeys.Control);
|
bool ctrDown = window.GetKey(KeyboardKeys.Control);
|
||||||
|
KeyDown?.Invoke(key);
|
||||||
|
|
||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user