diff options
author | Damar Indra <damarind@gmail.com> | 2018-02-17 18:08:44 +0700 |
---|---|---|
committer | damarindra <damarind@gmail.com> | 2018-02-20 22:33:59 +0700 |
commit | e69dd475017f91e73a02d8d78114cc9ad2c27f35 (patch) | |
tree | 017917a7c6a7e84c66cce1817d813af89f2862a5 /editor/plugins/tile_map_editor_plugin.cpp | |
parent | 3d4bf5a90e9b32c6c93647c7fa08785b22cd5442 (diff) |
Tileset Editor Improvement
Diffstat (limited to 'editor/plugins/tile_map_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index a102d99d1c..c97e949403 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -303,7 +303,7 @@ void TileMapEditor::_update_palette() { if (tex.is_valid()) { Rect2 region = tileset->tile_get_region(entries[i].id); - if (tileset->tile_get_is_autotile(entries[i].id)) { + if (tileset->tile_get_tile_mode(entries[i].id) == TileSet::AUTO_TILE) { int spacing = tileset->autotile_get_spacing(entries[i].id); region.size = tileset->autotile_get_size(entries[i].id); region.position += (region.size + Vector2(spacing, spacing)) * tileset->autotile_get_icon_coordinate(entries[i].id); @@ -506,7 +506,7 @@ void TileMapEditor::_draw_cell(int p_cell, const Point2i &p_point, bool p_flip_h Vector2 tile_ofs = node->get_tileset()->tile_get_texture_offset(p_cell); Rect2 r = node->get_tileset()->tile_get_region(p_cell); - if (node->get_tileset()->tile_get_is_autotile(p_cell)) { + if (node->get_tileset()->tile_get_tile_mode(p_cell) == TileSet::AUTO_TILE) { int spacing = node->get_tileset()->autotile_get_spacing(p_cell); r.size = node->get_tileset()->autotile_get_size(p_cell); r.position += (r.size + Vector2(spacing, spacing)) * node->get_tileset()->autotile_get_icon_coordinate(p_cell); |