Refactor Control autofocus to be handled by control type instead of as part of base.OnMouseDown
This commit is contained in:
@@ -597,6 +597,14 @@ namespace FlaxEditor.Content.GUI
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool OnMouseDown(Vector2 location, MouseButton button)
|
||||
{
|
||||
if (base.OnMouseDown(location, button))
|
||||
return true;
|
||||
return AutoFocus && Focus(this);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool OnMouseWheel(Vector2 location, float delta)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user