1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

set the grow direction of the center view button after setting the anchors

This commit is contained in:
ProbablyWorks
2023-05-31 21:22:04 -04:00
parent 5c2295ff53
commit 882ffdfaae

View File

@@ -580,6 +580,7 @@ TileAtlasView::TileAtlasView() {
button_center_view = memnew(Button); button_center_view = memnew(Button);
button_center_view->set_anchors_and_offsets_preset(Control::PRESET_TOP_RIGHT, Control::PRESET_MODE_MINSIZE, 5); button_center_view->set_anchors_and_offsets_preset(Control::PRESET_TOP_RIGHT, Control::PRESET_MODE_MINSIZE, 5);
button_center_view->set_grow_direction_preset(Control::PRESET_TOP_RIGHT);
button_center_view->connect("pressed", callable_mp(this, &TileAtlasView::_center_view)); button_center_view->connect("pressed", callable_mp(this, &TileAtlasView::_center_view));
button_center_view->set_flat(true); button_center_view->set_flat(true);
button_center_view->set_disabled(true); button_center_view->set_disabled(true);