aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/control.h
diff options
context:
space:
mode:
authorGilles Roudiere2018-01-14 14:13:11 +0100
committerGilles Roudiere2018-01-15 10:37:13 +0100
commitb06c6602c8a1a96f72bcbebb2a86176d1e69c79d (patch)
tree2158235a43a448f461a74372ed96dbaf177abb00 /scene/gui/control.h
parent05b1843818fd07f084816ec506ec505e24f8f02c (diff)
downloadgodot-b06c6602c8a1a96f72bcbebb2a86176d1e69c79d.tar.gz
godot-b06c6602c8a1a96f72bcbebb2a86176d1e69c79d.tar.zst
godot-b06c6602c8a1a96f72bcbebb2a86176d1e69c79d.zip
Changes the keep_margin parameter to true by default, so that people are not suprised that set_anchor changes the margins values
Diffstat (limited to '')
-rw-r--r--scene/gui/control.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/control.h b/scene/gui/control.h
index 2d61ecb2a..51325f27b 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -317,11 +317,11 @@ public:
/* POSITIONING */
- void set_anchors_preset(LayoutPreset p_preset, bool p_keep_margin = false);
+ void set_anchors_preset(LayoutPreset p_preset, bool p_keep_margin = true);
void set_margins_preset(LayoutPreset p_preset, LayoutPresetMode p_resize_mode = PRESET_MODE_MINSIZE, int p_margin = 0);
void set_anchors_and_margins_preset(LayoutPreset p_preset, LayoutPresetMode p_resize_mode = PRESET_MODE_MINSIZE, int p_margin = 0);
- void set_anchor(Margin p_margin, float p_anchor, bool p_keep_margin = false, bool p_push_opposite_anchor = true);
+ void set_anchor(Margin p_margin, float p_anchor, bool p_keep_margin = true, bool p_push_opposite_anchor = true);
float get_anchor(Margin p_margin) const;
void set_margin(Margin p_margin, float p_value);