Explorar el Código

TileMapEditor Modulate autotile previews

(cherry picked from commit 3f1b95cfb1d7c89d5e4ca07e00afe4fbbf2ffdbc)
kleonc hace 4 años
padre
commit
93cb416423
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      editor/plugins/tile_map_editor_plugin.cpp

+ 2 - 0
editor/plugins/tile_map_editor_plugin.cpp

@@ -578,6 +578,7 @@ void TileMapEditor::_update_palette() {
 		entries2.sort_custom<SwapComparator>();
 
 		Ref<Texture> tex = tileset->tile_get_texture(sel_tile);
+		Color modulate = tileset->tile_get_modulate(sel_tile);
 
 		for (int i = 0; i < entries2.size(); i++) {
 
@@ -594,6 +595,7 @@ void TileMapEditor::_update_palette() {
 					manual_palette->set_item_icon_region(manual_palette->get_item_count() - 1, region);
 
 				manual_palette->set_item_icon(manual_palette->get_item_count() - 1, tex);
+				manual_palette->set_item_icon_modulate(manual_palette->get_item_count() - 1, modulate);
 			}
 
 			manual_palette->set_item_metadata(manual_palette->get_item_count() - 1, entries2[i]);