mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-05-05 16:34:48 -04:00
Add fill color
This commit is contained in:
parent
5e49c3eae8
commit
a34c163cdb
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@ var layers := []
|
|||
var current_layer_index := 0
|
||||
var location := Vector2.ZERO
|
||||
var size := Vector2(64, 64)
|
||||
var fill_color := Color(0, 0, 0, 0)
|
||||
var frame := 0 setget frame_changed
|
||||
var frame_button : VBoxContainer
|
||||
var frame_texture_rect : TextureRect
|
||||
|
@ -35,8 +36,12 @@ func _ready() -> void:
|
|||
if Global.is_default_image:
|
||||
if Global.config_cache.has_section_key("preferences", "default_width") && Global.config_cache.has_section_key("preferences", "default_height"):
|
||||
size = Vector2(Global.config_cache.get_value("preferences", "default_width"), Global.config_cache.get_value("preferences", "default_height"))
|
||||
Global.is_default_image = !Global.is_default_image
|
||||
if Global.config_cache.has_section_key("preferences", "default_fill_color"):
|
||||
fill_color = Global.config_cache.get_value("preferences", "default_fill_color")
|
||||
Global.is_default_image = !Global.is_default_image
|
||||
|
||||
sprite.create(size.x, size.y, false, Image.FORMAT_RGBA8)
|
||||
sprite.fill(fill_color)
|
||||
sprite.lock()
|
||||
|
||||
var tex := ImageTexture.new()
|
||||
|
|
Loading…
Add table
Reference in a new issue