diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-12 17:10:34 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-12 17:10:34 -0300 |
commit | be223c91f93f8e5235a4425236a4c3254c3e62c1 (patch) | |
tree | 7eb0940e795a7b66216cedc3b0d21adcb3cf2328 /tools/editor | |
parent | 4667f9e61ebacda472a8df123018625488a54645 (diff) |
fixed tile map editor plugin, all previews are now the same size, closes #4983
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/plugins/tile_map_editor_plugin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp index 6d5f2a519c..5a40777665 100644 --- a/tools/editor/plugins/tile_map_editor_plugin.cpp +++ b/tools/editor/plugins/tile_map_editor_plugin.cpp @@ -208,9 +208,14 @@ void TileMapEditor::_update_palette() { palette->set_max_columns(0); palette->add_constant_override("hseparation", 6); + + float min_size = EDITOR_DEF("tile_map/preview_size",64); + palette->set_fixed_icon_size(Size2(min_size, min_size)); + palette->set_fixed_column_width(min_size*3/2); palette->set_icon_mode(ItemList::ICON_MODE_TOP); palette->set_max_text_lines(2); + String filter = search_box->get_text().strip_edges(); for (List<int>::Element *E=tiles.front();E;E=E->next()) { @@ -1434,6 +1439,7 @@ void TileMapEditorPlugin::make_visible(bool p_visible) { TileMapEditorPlugin::TileMapEditorPlugin(EditorNode *p_node) { + EDITOR_DEF("tile_map/preview_size",64); tile_map_editor = memnew( TileMapEditor(p_node) ); add_control_to_container(CONTAINER_CANVAS_EDITOR_SIDE, tile_map_editor); tile_map_editor->hide(); |