22 lines
693 B
GDScript3
22 lines
693 B
GDScript3
|
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)
|