Skip to content

Commit

Permalink
Merge pull request #78519 from groud/add_white_rect_to_tilemap_selection
Browse files Browse the repository at this point in the history
Add white rect to TileMap selection tool
  • Loading branch information
YuriSizov committed Jul 21, 2023
2 parents e38dc58 + 0fc5664 commit 5ae6176
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor/plugins/tiles/tile_map_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,9 +766,7 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
for (int y = rect.position.y; y < rect.get_end().y; y++) {
Vector2i coords = Vector2i(x, y);
if (tile_map->get_cell_source_id(tile_map_layer, coords) != TileSet::INVALID_SOURCE) {
Transform2D tile_xform;
tile_xform.set_origin(tile_map->map_to_local(coords));
tile_xform.set_scale(tile_shape_size);
Transform2D tile_xform(0, tile_shape_size, 0, tile_map->map_to_local(coords));
tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(1.0, 1.0, 1.0), false);
}
}
Expand All @@ -784,6 +782,8 @@ void TileMapEditorTilesPlugin::forward_canvas_draw_over_viewport(Control *p_over
if (tile_map->get_cell_source_id(tile_map_layer, coords) != TileSet::INVALID_SOURCE) {
to_draw.insert(coords);
}
Transform2D tile_xform(0, tile_shape_size, 0, tile_map->map_to_local(coords));
tile_set->draw_tile_shape(p_overlay, xform * tile_xform, Color(1.0, 1.0, 1.0, 0.2), true);
}
}
tile_map->draw_cells_outline(p_overlay, to_draw, Color(1.0, 1.0, 1.0), xform);
Expand Down

0 comments on commit 5ae6176

Please sign in to comment.