mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 22:44:42 -04:00
Makes the background UI darker when a dialog is being opened
This commit is contained in:
parent
0f5c7c5e59
commit
51b6aadbdd
6 changed files with 65 additions and 18 deletions
|
@ -16,6 +16,7 @@ func _ready() -> void:
|
|||
|
||||
func _on_FrameTagDialog_about_to_show() -> void:
|
||||
Global.can_draw = false
|
||||
Global.control.modulate = Color(0.5, 0.5, 0.5)
|
||||
for vbox in tag_vboxes:
|
||||
vbox.queue_free()
|
||||
tag_vboxes.clear()
|
||||
|
@ -58,6 +59,7 @@ func _on_FrameTagDialog_about_to_show() -> void:
|
|||
|
||||
func _on_FrameTagDialog_popup_hide() -> void:
|
||||
Global.can_draw = true
|
||||
Global.control.modulate = Color.white
|
||||
|
||||
|
||||
func _on_AddTag_pressed() -> void:
|
||||
|
|
|
@ -52,6 +52,8 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void:
|
|||
var file_name : String = path.get_file()
|
||||
Global.error_dialog.set_text(tr("Can't load file '%s'.\nError code: %s") % [file_name, str(err)])
|
||||
Global.error_dialog.popup_centered()
|
||||
Global.can_draw = false
|
||||
Global.control.modulate = Color(0.5, 0.5, 0.5)
|
||||
continue
|
||||
|
||||
var canvas : Canvas = load("res://src/Canvas.tscn").instance()
|
||||
|
@ -98,6 +100,8 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void:
|
|||
var file_name : String = first_path.get_file()
|
||||
Global.error_dialog.set_text(tr("Can't load file '%s'.\nError code: %s") % [file_name, str(err)])
|
||||
Global.error_dialog.popup_centered()
|
||||
Global.can_draw = false
|
||||
Global.control.modulate = Color(0.5, 0.5, 0.5)
|
||||
return
|
||||
|
||||
spritesheet_horizontal = min(spritesheet_horizontal, image.get_size().x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue