1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 01:29:49 +00:00

Support ImageExtended

This commit is contained in:
Emmanouil Papadeas 2024-11-20 14:53:21 +02:00
parent b74c3149af
commit 8abf44d65a
3 changed files with 7 additions and 3 deletions

View file

@ -217,7 +217,7 @@ Hold %s to displace the shape's origin""",
"Text",
"text",
"res://src/Tools/UtilityTools/Text.tscn",
[Global.LayerTypes.PIXEL],
[Global.LayerTypes.PIXEL, Global.LayerTypes.TILEMAP],
""
),
"3DShapeEdit":

View file

@ -10,7 +10,7 @@ var indices_x: int
var indices_y: int
func _init(_tileset: TileSetCustom, _image := Image.new(), _opacity := 1.0) -> void:
func _init(_tileset: TileSetCustom, _image: ImageExtended, _opacity := 1.0) -> void:
super._init(_image, _opacity)
tileset = _tileset
indices_x = ceili(float(get_image().get_width()) / tileset.tile_size.x)

View file

@ -17,5 +17,9 @@ func get_layer_type() -> int:
func new_empty_cel() -> BaseCel:
var image := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var format := project.get_image_format()
var is_indexed := project.is_indexed()
var image := ImageExtended.create_custom(
project.size.x, project.size.y, false, format, is_indexed
)
return CelTileMap.new(tileset, image)