godot-psd-training/UI/LCB2/lcb_2.gd
2024-04-16 17:00:05 +08:00

33 lines
592 B
GDScript

extends Window
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_psl_button_pressed() -> void:
print('psl-button-pressed');
self.show()
func _on_close_requested() -> void:
self.hide()
## 旋钮的状态枚举
enum KNOB_STATE{
ISOLATE,# 隔离
AUTO,# 自动
OPEN,# 开门
CLOSE,# 关门
}
var knob_state = KNOB_STATE.AUTO;
func change_knob_state(state):
knob_state = state