update ui

This commit is contained in:
2026-06-15 22:55:04 +02:00
parent 1d8346d294
commit 93219377b1
17 changed files with 271 additions and 156 deletions

View File

@@ -3,31 +3,5 @@ extends Button
class_name CustomCheckbox
@export var color: Color = Color(1,1,1,1):
set(value):
color = value
if is_inside_tree() and has_node("%ToggleTexture"):
$%ToggleTexture.modulate = color
@export var image: Texture:
set(value):
image = value
if is_inside_tree() and has_node("%Texture"):
$%Texture.texture = image
@export var image_toggle: Texture:
set(value):
image_toggle = value
if is_inside_tree() and has_node("%ToggleTexture"):
$%ToggleTexture.texture = image_toggle
func _ready():
if image != null and has_node("%Texture"):
$%Texture.texture = image
if image_toggle != null and has_node("%ToggleTexture"):
$%ToggleTexture.texture = image_toggle
$%ToggleTexture.modulate = color
$%ToggleTexture.visible = button_pressed
func _on_toggled(toggled_on: bool) -> void:
$%ToggleTexture.visible = toggled_on