Fix AutoFocus on ContainerControl to be false by default
This commit is contained in:
@@ -114,9 +114,10 @@ namespace FlaxEditor.GUI.ContextMenu
|
||||
public ContextMenuBase()
|
||||
: base(0, 0, 120, 32)
|
||||
{
|
||||
_direction = ContextMenuDirection.RightDown;
|
||||
Visible = false;
|
||||
AutoFocus = true;
|
||||
|
||||
_direction = ContextMenuDirection.RightDown;
|
||||
_isSubMenu = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,8 @@ namespace FlaxEditor.GUI.Dialogs
|
||||
public ColorSelector(float wheelSize)
|
||||
: base(0, 0, wheelSize, wheelSize)
|
||||
{
|
||||
AutoFocus = true;
|
||||
|
||||
_colorWheelSprite = Editor.Instance.Icons.ColorWheel128;
|
||||
_wheelRect = new Rectangle(0, 0, wheelSize, wheelSize);
|
||||
}
|
||||
|
||||
@@ -65,8 +65,6 @@ namespace FlaxEditor.GUI.Docking
|
||||
internal DockPanelProxy(DockPanel panel)
|
||||
: base(0, 0, 64, 64)
|
||||
{
|
||||
AutoFocus = false;
|
||||
|
||||
_panel = panel;
|
||||
AnchorPreset = AnchorPresets.StretchAll;
|
||||
Offsets = Margin.Zero;
|
||||
|
||||
@@ -368,6 +368,8 @@ namespace FlaxEditor.GUI.Input
|
||||
public SliderControl(float value, float x = 0, float y = 0, float width = 120, float min = float.MinValue, float max = float.MaxValue)
|
||||
: base(x, y, width, TextBox.DefaultHeight)
|
||||
{
|
||||
AutoFocus = true;
|
||||
|
||||
_min = min;
|
||||
_max = max;
|
||||
_value = Mathf.Clamp(value, min, max);
|
||||
|
||||
@@ -319,6 +319,8 @@ namespace FlaxEditor.GUI.Tree
|
||||
public TreeNode(bool canChangeOrder, SpriteHandle iconCollapsed, SpriteHandle iconOpened)
|
||||
: base(0, 0, 64, 16)
|
||||
{
|
||||
AutoFocus = true;
|
||||
|
||||
_canChangeOrder = canChangeOrder;
|
||||
_animationProgress = 1.0f;
|
||||
_cachedHeight = _headerHeight;
|
||||
|
||||
@@ -233,6 +233,8 @@ namespace FlaxEditor.Surface.Archetypes
|
||||
public BlendPointsEditor(Animation.MultiBlend node, bool is2D, float x, float y, float width, float height)
|
||||
: base(x, y, width, height)
|
||||
{
|
||||
AutoFocus = true;
|
||||
|
||||
_node = node;
|
||||
_is2D = is2D;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace FlaxEditor.Surface.Elements
|
||||
{
|
||||
ParentNode = parentNode;
|
||||
Archetype = archetype;
|
||||
AutoFocus = true;
|
||||
|
||||
var back = Style.Current.TextBoxBackground;
|
||||
var grayOutFactor = 0.6f;
|
||||
|
||||
@@ -59,6 +59,7 @@ namespace FlaxEditor.Surface
|
||||
protected SurfaceControl(VisjectSurfaceContext context, float width, float height)
|
||||
: base(0, 0, width, height)
|
||||
{
|
||||
AutoFocus = true;
|
||||
ClipChildren = false;
|
||||
|
||||
Surface = context.Surface;
|
||||
|
||||
@@ -381,6 +381,8 @@ namespace FlaxEngine.GUI
|
||||
public Dropdown()
|
||||
: base(0, 0, 120, 18.0f)
|
||||
{
|
||||
AutoFocus = true;
|
||||
|
||||
var style = Style.Current;
|
||||
Font = new FontReference(style.FontMedium);
|
||||
TextColor = style.Foreground;
|
||||
|
||||
@@ -298,6 +298,8 @@ public class Slider : ContainerControl
|
||||
public Slider(float width, float height)
|
||||
: base(0, 0, width, height)
|
||||
{
|
||||
AutoFocus = true;
|
||||
|
||||
var style = Style.Current;
|
||||
TrackLineColor = style.BackgroundHighlighted;
|
||||
TrackFillLineColor = style.LightBackground;
|
||||
|
||||
@@ -511,6 +511,8 @@ namespace FlaxEngine.GUI
|
||||
protected TextBoxBase(bool isMultiline, float x, float y, float width = 120)
|
||||
: base(x, y, width, DefaultHeight)
|
||||
{
|
||||
AutoFocus = true;
|
||||
|
||||
_isMultiline = isMultiline;
|
||||
_maxLength = 2147483646;
|
||||
_selectionStart = _selectionEnd = -1;
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace FlaxEngine.GUI
|
||||
public ContainerControl()
|
||||
{
|
||||
_isLayoutLocked = true;
|
||||
AutoFocus = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -47,6 +48,7 @@ namespace FlaxEngine.GUI
|
||||
: base(x, y, width, height)
|
||||
{
|
||||
_isLayoutLocked = true;
|
||||
AutoFocus = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -56,6 +58,7 @@ namespace FlaxEngine.GUI
|
||||
: base(location, size)
|
||||
{
|
||||
_isLayoutLocked = true;
|
||||
AutoFocus = false;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -63,6 +66,7 @@ namespace FlaxEngine.GUI
|
||||
: base(bounds)
|
||||
{
|
||||
_isLayoutLocked = true;
|
||||
AutoFocus = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -165,6 +165,8 @@ namespace FlaxEngine.GUI
|
||||
public RadialMenu(float x, float y, float width = 100, float height = 100)
|
||||
: base(x, y, width, height)
|
||||
{
|
||||
AutoFocus = true;
|
||||
|
||||
var style = Style.Current;
|
||||
if (style != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user