45 lines
1.4 KiB
GDScript
45 lines
1.4 KiB
GDScript
extends Window
|
|
|
|
var currenScreenDoor:ScreenDoor=null
|
|
|
|
@onready var isolation_strip: Button = $PanelContainer/MarginContainer/VBoxContainer/IsolationStrip/IsolationStrip
|
|
|
|
|
|
func _on_screen_door_click_signal(screenDoor:ScreenDoor,mousePosition) -> void:
|
|
position = Vector2(mousePosition.x-100,mousePosition.y)
|
|
currenScreenDoor = screenDoor
|
|
show()
|
|
if screenDoor.isSetIsolationStrip :
|
|
isolation_strip.text = '撤下隔离带'
|
|
else :
|
|
isolation_strip.text = '放置隔离带'
|
|
|
|
func _on_close_requested() -> void:
|
|
hide()
|
|
|
|
##粘胶带
|
|
func _on_adhesive_tape_button_down() -> void:
|
|
currenScreenDoor.adhesiveTape()
|
|
hide()
|
|
|
|
func _on_adhesive_tape_mouse_entered() -> void:
|
|
$PanelContainer/MarginContainer/VBoxContainer/MarginContainer/AdhesiveTape/AdhesiveTape.set_default_cursor_shape(Control.CursorShape.CURSOR_POINTING_HAND)
|
|
|
|
|
|
func _on_adhesive_tape_mouse_exited() -> void:
|
|
$PanelContainer/MarginContainer/VBoxContainer/MarginContainer/AdhesiveTape/AdhesiveTape.set_default_cursor_shape(Control.CursorShape.CURSOR_ARROW)
|
|
|
|
##隔离带
|
|
func _on_isolation_strip_button_down() -> void:
|
|
currenScreenDoor.isSetIsolationStrip = !currenScreenDoor.isSetIsolationStrip
|
|
hide()
|
|
|
|
|
|
func _on_isolation_strip_mouse_entered() -> void:
|
|
isolation_strip.set_default_cursor_shape(Control.CursorShape.CURSOR_POINTING_HAND)
|
|
|
|
|
|
func _on_isolation_strip_mouse_exited() -> void:
|
|
isolation_strip.set_default_cursor_shape(Control.CursorShape.CURSOR_ARROW)
|
|
|