mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-12-06 03:30:22 -08:00
fixed challenge mode results being able to be closed
This commit is contained in:
parent
14c193fb27
commit
21499f3697
2 changed files with 3 additions and 2 deletions
|
|
@ -1067,7 +1067,7 @@ metadata/_custom_type_script = "uid://364rywt44hy6"
|
|||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="PauseMenu" parent="CanvasLayer" instance=ExtResource("31_1l20f")]
|
||||
visible = false
|
||||
can_exit = false
|
||||
|
||||
[node name="WorldSelect" parent="CanvasLayer" instance=ExtResource("32_xk7j8")]
|
||||
visible = false
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ var selected_index := 0
|
|||
|
||||
var active := false
|
||||
|
||||
@export var can_exit := true
|
||||
@export var is_pause := true
|
||||
|
||||
signal option_1_selected
|
||||
|
|
@ -30,7 +31,7 @@ func handle_inputs() -> void:
|
|||
selected_index = clamp(selected_index, 0, options.size() - 1)
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
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()
|
||||
|
||||
func option_selected() -> void:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue