otherworldly_simulation/scene/tool_button/tool_button.gd

22 lines
693 B
GDScript3
Raw Permalink Normal View History

2024-11-01 23:23:07 +08:00
extends Button
class_name ToolButton
func on_button_down() -> void:
get_parent().modulate=Color(0.5,0.5,0.5,1)
pass # Replace with function body.
func on_button_up() -> void:
get_parent().modulate=Color(1,1,1,1)
pass # Replace with function body.ion body.
static func static_on_button_down(canvas:CanvasItem) -> void:
canvas.modulate=Color(0.5,0.5,0.5,1)
pass # Replace with function body.
static func static_on_button_up(canvas:CanvasItem) -> void:
canvas.modulate=Color(1,1,1,1)
pass # Replace with function body.ion body.
func disable(is_disable:bool):
disabled=is_disable
if is_disable:
get_parent().modulate=Color(0.5,0.5,0.5,1)
else:
get_parent().modulate=Color(1,1,1,1)