mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-05-07 14:04: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
|
# The sprite itself
|
||||||
if layers.empty():
|
if layers.empty():
|
||||||
var sprite := Image.new()
|
var sprite := Image.new()
|
||||||
if Global.config_cache.has_section_key("preferences", "default_width") && Global.config_cache.has_section_key("preferences", "default_height"):
|
if Global.is_default_image:
|
||||||
size = Vector2(Global.config_cache.get_value("preferences", "default_width"), Global.config_cache.get_value("preferences", "default_height"))
|
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.create(size.x, size.y, false, Image.FORMAT_RGBA8)
|
||||||
sprite.lock()
|
sprite.lock()
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ var image_clipboard : Image
|
||||||
# warning-ignore:unused_class_variable
|
# warning-ignore:unused_class_variable
|
||||||
var theme_type := "Dark"
|
var theme_type := "Dark"
|
||||||
# warning-ignore:unused_class_variable
|
# warning-ignore:unused_class_variable
|
||||||
|
var is_default_image := true
|
||||||
|
# warning-ignore:unused_class_variable
|
||||||
var default_image_width := 32
|
var default_image_width := 32
|
||||||
# warning-ignore:unused_class_variable
|
# warning-ignore:unused_class_variable
|
||||||
var default_image_height := 32
|
var default_image_height := 32
|
||||||
|
|
Loading…
Add table
Reference in a new issue