26 lines
426 B
GDScript
26 lines
426 B
GDScript
extends Window
|
|
|
|
var current_focus: CanvasItem
|
|
|
|
func _on_key_focus_entered(node):
|
|
current_focus = node
|
|
print("node : ", current_focus.name, " focus")
|
|
|
|
|
|
func _on_button_pressed():
|
|
if current_focus == null:
|
|
print("请选择钥匙")
|
|
else:
|
|
print("使用钥匙:", current_focus.name)
|
|
current_focus.hide_key()
|
|
|
|
|
|
|
|
func _on_close_requested():
|
|
print("close req")
|
|
self.hide()
|
|
|
|
|
|
func _on_show_button_pressed():
|
|
self.show()
|