Fix incorrect drawing of alternative tiles
This commit is contained in:
parent
879aac9db4
commit
4b29f71685
@ -2002,7 +2002,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
|
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
|
||||||
Vector2 position = rect.get_center();
|
Vector2 position = rect.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
|
||||||
|
|
||||||
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
|
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
|
||||||
xform.translate_local(position);
|
xform.translate_local(position);
|
||||||
@ -2026,7 +2026,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(E.tile, E.alternative);
|
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(E.tile, E.alternative);
|
||||||
Vector2 position = rect.get_center();
|
Vector2 position = rect.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(E.tile, E.alternative);
|
||||||
|
|
||||||
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
|
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
|
||||||
xform.translate_local(position);
|
xform.translate_local(position);
|
||||||
|
Loading…
Reference in New Issue
Block a user