diff options
Diffstat (limited to 'scene/gui/control.h')
-rw-r--r-- | scene/gui/control.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scene/gui/control.h b/scene/gui/control.h index 9c78932cf4..8c7f700682 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -103,6 +103,25 @@ public: CURSOR_MAX }; + enum LayoutPreset { + PRESET_TOP_LEFT, + PRESET_TOP_RIGHT, + PRESET_BOTTOM_LEFT, + PRESET_BOTTOM_RIGHT, + PRESET_CENTER_LEFT, + PRESET_CENTER_TOP, + PRESET_CENTER_RIGHT, + PRESET_CENTER_BOTTOM, + PRESET_CENTER, + PRESET_LEFT_WIDE, + PRESET_TOP_WIDE, + PRESET_RIGHT_WIDE, + PRESET_BOTTOM_WIDE, + PRESET_VCENTER_WIDE, + PRESET_HCENTER_WIDE, + PRESET_WIDE + }; + private: struct CComparator { @@ -275,6 +294,7 @@ public: void set_anchor(Margin p_margin, float p_anchor, bool p_keep_margin = false); void set_anchor_and_margin(Margin p_margin, float p_anchor, float p_pos); + void set_anchors_preset(LayoutPreset p_preset, bool p_keep_margin = false); float get_anchor(Margin p_margin) const; @@ -426,6 +446,7 @@ public: VARIANT_ENUM_CAST(Control::FocusMode); VARIANT_ENUM_CAST(Control::SizeFlags); VARIANT_ENUM_CAST(Control::CursorShape); +VARIANT_ENUM_CAST(Control::LayoutPreset); VARIANT_ENUM_CAST(Control::MouseFilter); VARIANT_ENUM_CAST(Control::GrowDirection); |