mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-05-05 16:54:49 -04:00
Fix
This commit is contained in:
parent
7b0251fdfa
commit
5e49c3eae8
2 changed files with 6 additions and 2 deletions
|
@ -32,8 +32,10 @@ func _ready() -> void:
|
|||
# The sprite itself
|
||||
if layers.empty():
|
||||
var sprite := Image.new()
|
||||
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"))
|
||||
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
|
||||
sprite.create(size.x, size.y, false, Image.FORMAT_RGBA8)
|
||||
sprite.lock()
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@ var image_clipboard : Image
|
|||
# warning-ignore:unused_class_variable
|
||||
var theme_type := "Dark"
|
||||
# warning-ignore:unused_class_variable
|
||||
var is_default_image := true
|
||||
# warning-ignore:unused_class_variable
|
||||
var default_image_width := 32
|
||||
# warning-ignore:unused_class_variable
|
||||
var default_image_height := 32
|
||||
|
|
Loading…
Add table
Reference in a new issue