mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
fixed challenge mode results being able to be closed
This commit is contained in:
@@ -1067,7 +1067,7 @@ metadata/_custom_type_script = "uid://364rywt44hy6"
|
|||||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
[node name="PauseMenu" parent="CanvasLayer" instance=ExtResource("31_1l20f")]
|
[node name="PauseMenu" parent="CanvasLayer" instance=ExtResource("31_1l20f")]
|
||||||
visible = false
|
can_exit = false
|
||||||
|
|
||||||
[node name="WorldSelect" parent="CanvasLayer" instance=ExtResource("32_xk7j8")]
|
[node name="WorldSelect" parent="CanvasLayer" instance=ExtResource("32_xk7j8")]
|
||||||
visible = false
|
visible = false
|
||||||
|
@@ -7,6 +7,7 @@ var selected_index := 0
|
|||||||
|
|
||||||
var active := false
|
var active := false
|
||||||
|
|
||||||
|
@export var can_exit := true
|
||||||
@export var is_pause := true
|
@export var is_pause := true
|
||||||
|
|
||||||
signal option_1_selected
|
signal option_1_selected
|
||||||
@@ -30,7 +31,7 @@ func handle_inputs() -> void:
|
|||||||
selected_index = clamp(selected_index, 0, options.size() - 1)
|
selected_index = clamp(selected_index, 0, options.size() - 1)
|
||||||
if Input.is_action_just_pressed("ui_accept"):
|
if Input.is_action_just_pressed("ui_accept"):
|
||||||
option_selected()
|
option_selected()
|
||||||
elif Input.is_action_just_pressed("pause") or Input.is_action_just_pressed("ui_back"):
|
elif (Input.is_action_just_pressed("pause") or Input.is_action_just_pressed("ui_back")) and can_exit:
|
||||||
close()
|
close()
|
||||||
|
|
||||||
func option_selected() -> void:
|
func option_selected() -> void:
|
||||||
|
Reference in New Issue
Block a user