Merge pull request #11424 from groud/control_node_presets

Implements set_margins_preset(...)
This commit is contained in:
Rémi Verschelde
2017-09-26 00:11:46 +02:00
committed by GitHub
32 changed files with 193 additions and 87 deletions

View File

@@ -1889,7 +1889,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
text_edit = memnew(TextEdit);
add_child(text_edit);
text_edit->set_area_as_parent_rect(5);
text_edit->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5);
text_edit->set_margin(MARGIN_BOTTOM, -30);
text_edit->hide();
@@ -1948,12 +1948,12 @@ CustomPropertyEditor::CustomPropertyEditor() {
spinbox = memnew(SpinBox);
add_child(spinbox);
spinbox->set_area_as_parent_rect(5);
spinbox->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5);
spinbox->connect("value_changed", this, "_range_modified");
slider = memnew(HSlider);
add_child(slider);
slider->set_area_as_parent_rect(5);
slider->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5);
slider->connect("value_changed", this, "_range_modified");
create_dialog = NULL;