godot-psd-training/UI/LCB2/lcb_2.gd

33 lines
592 B
GDScript3
Raw Normal View History

2024-04-15 14:54:06 +08:00
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
2024-04-16 09:46:51 +08:00
func _on_psl_button_pressed() -> void:
print('psl-button-pressed');
self.show()
func _on_close_requested() -> void:
self.hide()
2024-04-15 14:54:06 +08:00
## 旋钮的状态枚举
enum KNOB_STATE{
2024-04-16 09:46:51 +08:00
ISOLATE,# 隔离
AUTO,# 自动
OPEN,# 开门
CLOSE,# 关门
2024-04-15 14:54:06 +08:00
}
2024-04-16 09:46:51 +08:00
var knob_state = KNOB_STATE.AUTO;
func change_knob_state(state):
knob_state = state