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

Merge pull request #104192 from arkology/tile_editors_ui_ux

Improve/fix `TileMap` and `TileSet` editors UI
This commit is contained in:
Rémi Verschelde
2025-03-19 12:27:18 +01:00
5 changed files with 30 additions and 18 deletions

View File

@@ -2371,6 +2371,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
missing_source_label = memnew(Label);
missing_source_label->set_text(TTR("This TileMap's TileSet has no Tile Source configured. Go to the TileSet bottom panel to add one."));
missing_source_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
missing_source_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
missing_source_label->set_v_size_flags(Control::SIZE_EXPAND_FILL);
missing_source_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
@@ -2489,8 +2490,9 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
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_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
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_HCENTER_WIDE);
patterns_item_list->add_child(patterns_help_label);
// Update.
@@ -4107,6 +4109,7 @@ void TileMapLayerEditor::_tab_changed(int p_tab_id) {
// Graphical update.
tabs_data[tabs_bar->get_current_tab()].panel->queue_redraw();
CanvasItemEditor::get_singleton()->update_viewport();
_update_bottom_panel();
}
void TileMapLayerEditor::_layers_select_next_or_previous(bool p_next) {
@@ -4515,6 +4518,8 @@ TileMapLayerEditor::TileMapLayerEditor() {
// A label for editing errors.
cant_edit_label = memnew(Label);
cant_edit_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);
cant_edit_label->set_anchors_and_offsets_preset(Control::PRESET_HCENTER_WIDE);
cant_edit_label->set_h_size_flags(SIZE_EXPAND_FILL);
cant_edit_label->set_v_size_flags(SIZE_EXPAND_FILL);
cant_edit_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);