You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Add pattern index tooltip to tilemap and tileset editor
Just a little UI convenience feature. Knowing the index (without having to count manually) is convenient when working with tile patterns programmatically, especially when having lots of them.
This commit is contained in:
@@ -321,6 +321,7 @@ void TileMapEditorTilesPlugin::_update_patterns_list() {
|
||||
for (int i = 0; i < tile_set->get_patterns_count(); i++) {
|
||||
int id = patterns_item_list->add_item("");
|
||||
patterns_item_list->set_item_metadata(id, tile_set->get_pattern(i));
|
||||
patterns_item_list->set_item_tooltip(id, vformat(TTR("Index: %d"), i));
|
||||
TilesEditorPlugin::get_singleton()->queue_pattern_preview(tile_set, tile_set->get_pattern(i), callable_mp(this, &TileMapEditorTilesPlugin::_pattern_preview_done));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user