mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Fix manual mode when the tilemap is empty.
This commit is contained in:
parent
3bf556345d
commit
5f10a913d4
|
@ -352,10 +352,11 @@ func update_texture(undo := false) -> void:
|
||||||
var rect := Rect2i(coords, tileset.tile_size)
|
var rect := Rect2i(coords, tileset.tile_size)
|
||||||
var image_portion := image.get_region(rect)
|
var image_portion := image.get_region(rect)
|
||||||
var current_tile := tileset.tiles[index]
|
var current_tile := tileset.tiles[index]
|
||||||
if index == 0 and tileset.tiles.size() > 1:
|
if index == 0:
|
||||||
# Prevent from drawing on empty image portions.
|
if tileset.tiles.size() > 1:
|
||||||
var tile_size := current_tile.image.get_size()
|
# Prevent from drawing on empty image portions.
|
||||||
image.blit_rect(current_tile.image, Rect2i(Vector2i.ZERO, tile_size), coords)
|
var tile_size := current_tile.image.get_size()
|
||||||
|
image.blit_rect(current_tile.image, Rect2i(Vector2i.ZERO, tile_size), coords)
|
||||||
continue
|
continue
|
||||||
if editing_images.has(index):
|
if editing_images.has(index):
|
||||||
var editing_portion := editing_images[index][0] as int
|
var editing_portion := editing_images[index][0] as int
|
||||||
|
|
Loading…
Reference in a new issue