Fix button state (enabled/disabled)

This commit is contained in:
ChaoticByte 2025-10-10 22:39:10 +02:00
parent b7e2c9dfa2
commit 25e1542827
Signed by: ChaoticByte
SSH key fingerprint: SHA256:bHr1NPU+JZFLUbsTl2/mfa6U+6dcM7VjKohzXnshfFY

View file

@ -41,13 +41,13 @@ func _input(event):
#
func set_buttons_disabled(disabled: bool):
if disabled:
for b in [open_shader_button, open_image_button, save_image_button, fit_image_button, apply_shader_button, status_indicator]:
b.disabled = disabled
var btns = []
if disabled or (Filesystem.input_image_path != "" and Filesystem.shader_path != ""):
btns = [open_shader_button, open_image_button, save_image_button, fit_image_button, apply_shader_button, status_indicator]
else:
for b in [open_shader_button, open_image_button, fit_image_button, apply_shader_button, status_indicator]:
btns = [open_shader_button, open_image_button, fit_image_button, apply_shader_button, status_indicator]
for b in btns:
b.disabled = disabled
#
func _on_open_shader_button_pressed():