Fix output log window to properly handle copy and other input events
This commit is contained in:
@@ -80,12 +80,9 @@ namespace FlaxEditor.Windows
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public TextBlockStyle ErrorStyle;
|
public TextBlockStyle ErrorStyle;
|
||||||
|
|
||||||
/// <inheritdoc />
|
public OutputTextBox()
|
||||||
public override bool OnKeyDown(KeyboardKeys key)
|
|
||||||
{
|
{
|
||||||
if (Window.InputActions.Process(Editor.Instance, this, key))
|
_consumeAllKeyDownEvents = false;
|
||||||
return true;
|
|
||||||
return base.OnKeyDown(key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@@ -504,6 +501,23 @@ namespace FlaxEditor.Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool OnKeyDown(KeyboardKeys key)
|
||||||
|
{
|
||||||
|
var input = Editor.Options.Options.Input;
|
||||||
|
if (input.Search.Process(this, key))
|
||||||
|
{
|
||||||
|
if (!_searchBox.ContainsFocus)
|
||||||
|
{
|
||||||
|
_searchBox.Focus();
|
||||||
|
_searchBox.SelectAll();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return base.OnKeyDown(key);
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override bool OnMouseUp(Float2 location, MouseButton button)
|
public override bool OnMouseUp(Float2 location, MouseButton button)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -127,6 +127,11 @@ namespace FlaxEngine.GUI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected bool _changeCursor = true;
|
protected bool _changeCursor = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// True if always return true as default for key events, otherwise won't consume them.
|
||||||
|
/// </summary>
|
||||||
|
protected bool _consumeAllKeyDownEvents = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event fired when text gets changed
|
/// Event fired when text gets changed
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1542,7 +1547,7 @@ namespace FlaxEngine.GUI
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return _consumeAllKeyDownEvents;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user