46 lines
1.1 KiB
GDScript
46 lines
1.1 KiB
GDScript
extends Window
|
|
|
|
|
|
func _on_psl_click_signal() -> void:
|
|
self.show()
|
|
$"../stationKeys".onShowWindow($"../stationKeys".WindowType.PSL)
|
|
if !$"../stationKeys".hsjcKeyVisible() :
|
|
hideInterlockReleaseSwitchHandleKey()
|
|
if !$"../stationKeys".pslKeyVisible() :
|
|
hidePSLAllowHandleKey()
|
|
|
|
|
|
|
|
|
|
func _on_close_requested():
|
|
self.hide()
|
|
$"../stationKeys".hide()
|
|
|
|
|
|
func shouPSLAllowHandleKey():
|
|
$MarginContainer/GridContainer/PSLAllow.shouHandleKey()
|
|
|
|
|
|
func hidePSLAllowHandleKey():
|
|
$MarginContainer/GridContainer/PSLAllow.hideHandleKey()
|
|
|
|
|
|
func shouInterlockReleaseSwitchHandleKey():
|
|
$MarginContainer/GridContainer/InterlockReleaseSwitch.shouHandleKey()
|
|
|
|
func hideInterlockReleaseSwitchHandleKey():
|
|
$MarginContainer/GridContainer/InterlockReleaseSwitch.hideHandleKey()
|
|
|
|
|
|
func onHandleSignal(openLight: bool, keySwitch: Variant) -> void:
|
|
print(openLight,keySwitch,666)
|
|
|
|
|
|
func remove_key(keyName: Variant) -> void:
|
|
var name = ''
|
|
if keyName == 'PSLAllow' :
|
|
name = 'PSL_Key'
|
|
elif keyName == 'InterlockReleaseSwitch' :
|
|
name = 'HSJC_Key'
|
|
$"../stationKeys".showKeyAfterRemoveKey(name)
|