You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-05 17:15:09 +00:00
Properly center labels in the TileMap/Set editors
This commit is contained in:
@@ -2267,6 +2267,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
|
|||||||
|
|
||||||
patterns_help_label = memnew(Label);
|
patterns_help_label = memnew(Label);
|
||||||
patterns_help_label->set_text(TTR("Drag and drop or paste a TileMap selection here to store a pattern."));
|
patterns_help_label->set_text(TTR("Drag and drop or paste a TileMap selection here to store a pattern."));
|
||||||
|
patterns_help_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||||
patterns_help_label->set_anchors_and_offsets_preset(Control::PRESET_CENTER);
|
patterns_help_label->set_anchors_and_offsets_preset(Control::PRESET_CENTER);
|
||||||
patterns_item_list->add_child(patterns_help_label);
|
patterns_item_list->add_child(patterns_help_label);
|
||||||
|
|
||||||
|
|||||||
@@ -701,7 +701,7 @@ TileSetEditor::TileSetEditor() {
|
|||||||
|
|
||||||
source_sort_button = memnew(MenuButton);
|
source_sort_button = memnew(MenuButton);
|
||||||
source_sort_button->set_flat(true);
|
source_sort_button->set_flat(true);
|
||||||
source_sort_button->set_tooltip_text(TTR("Sort sources"));
|
source_sort_button->set_tooltip_text(TTR("Sort Sources"));
|
||||||
|
|
||||||
PopupMenu *p = source_sort_button->get_popup();
|
PopupMenu *p = source_sort_button->get_popup();
|
||||||
p->connect("id_pressed", callable_mp(this, &TileSetEditor::_set_source_sort));
|
p->connect("id_pressed", callable_mp(this, &TileSetEditor::_set_source_sort));
|
||||||
@@ -801,6 +801,7 @@ TileSetEditor::TileSetEditor() {
|
|||||||
|
|
||||||
patterns_help_label = memnew(Label);
|
patterns_help_label = memnew(Label);
|
||||||
patterns_help_label->set_text(TTR("Add new patterns in the TileMap editing mode."));
|
patterns_help_label->set_text(TTR("Add new patterns in the TileMap editing mode."));
|
||||||
|
patterns_help_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||||
patterns_help_label->set_anchors_and_offsets_preset(Control::PRESET_CENTER);
|
patterns_help_label->set_anchors_and_offsets_preset(Control::PRESET_CENTER);
|
||||||
patterns_item_list->add_child(patterns_help_label);
|
patterns_item_list->add_child(patterns_help_label);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user