紧急停车按钮问题调整

This commit is contained in:
joylink_fanyuhong 2024-05-30 16:45:00 +08:00
parent 05b5a6f8e4
commit 048f640115
3 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,8 @@ func test_enter():
return self.get_rect().has_point(to_local(mouse_position))
func _input(event):
if self.visible == false:
return
if event is InputEventMouseMotion:
var flag1 = test_enter()
if flag1:
@ -33,3 +35,4 @@ func _input(event):
self.hide()
$"../JJTC_Key".hide()
$"..".pullOutKey()
$"../JJTC_Button".hide()

View File

@ -14,6 +14,8 @@ func test_enter():
return self.get_rect().has_point(to_local(mouse_position))
func _input(event):
if self.visible == false:
return
if event is InputEventMouseMotion:
var flag1 = test_enter()
if flag1:
@ -31,6 +33,7 @@ func _input(event):
if !$"..".allowHandle :
return
$"../PanelContainer/VBoxContainer/MarginContainer/JJTC_Box".jjtc_state = $"../PanelContainer/VBoxContainer/MarginContainer/JJTC_Box".JJTC_STATE.OPEN
$"../JJTC_Button".show()
$"../JJTC_Box_Voice".play()
$"../JJTC_Key".hide()
self.hide()

View File

@ -36,6 +36,7 @@ layout_mode = 2
script = ExtResource("1_sa7p7")
[node name="JJTC_Button" type="TextureRect" parent="."]
visible = false
offset_left = 230.0
offset_top = 202.0
offset_right = 320.0