aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/tile_map_editor_plugin.cpp
diff options
context:
space:
mode:
authorBojidar Marinov2016-05-27 22:42:51 +0300
committerBojidar Marinov2016-05-27 22:42:51 +0300
commitab97718d8aca65297b147770e5158f0494ac5bb8 (patch)
tree4a05e0e0fd78e4d92a688b5b57b4f1149dbfee43 /tools/editor/plugins/tile_map_editor_plugin.cpp
parent7c1594ee5a6e17216ffa4e73e33be235e65e0946 (diff)
downloadgodot-ab97718d8aca65297b147770e5158f0494ac5bb8.tar.gz
godot-ab97718d8aca65297b147770e5158f0494ac5bb8.tar.zst
godot-ab97718d8aca65297b147770e5158f0494ac5bb8.zip
Reorder tiles into nice columns
Diffstat (limited to 'tools/editor/plugins/tile_map_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index 263ff11f3..a98314b29 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -205,7 +205,9 @@ void TileMapEditor::_update_palette() {
if (tiles.empty())
return;
+
palette->set_max_columns(0);
+ palette->add_constant_override("hseparation", 6);
palette->set_icon_mode(ItemList::ICON_MODE_TOP);
palette->set_max_text_lines(2);
@@ -239,6 +241,8 @@ void TileMapEditor::_update_palette() {
palette->set_item_metadata(palette->get_item_count()-1, E->get());
}
+
+ palette->set_same_column_width(true);
if (selected != -1)
set_selected_tile(selected);
@@ -1210,9 +1214,8 @@ void TileMapEditor::_tileset_settings_changed() {
void TileMapEditor::_icon_size_changed(float p_value) {
if (node) {
- Size2 size = node->get_cell_size() * p_value;
- palette->set_min_icon_size(size + Size2(4, 0)); //4px gap between tiles
- //palette->set_max_icon_size(size);
+ //Size2 size = node->get_cell_size() * p_value;
+ //palette->set_min_icon_size(size + Size2(4, 0)); //4px gap between tiles
palette->set_icon_scale(p_value);
_update_palette();
}