checheche/Robo-Bus-A31-HMI/common/gui/common_select.gd
2024-12-06 21:22:11 +08:00

17 lines
303 B
GDScript

@tool
class_name CommonSelect
extends BaseControl
@export var unselectIcon :Resource
@export var selectIcon :Resource
var isSelect = false :
set(value):
isSelect = value
if value :
%icon.texture = selectIcon
else:
%icon.texture = unselectIcon
func _ready():
%icon.texture = unselectIcon