death and restart menu working
This commit is contained in:
@@ -4,25 +4,10 @@ extends OverlaidMenu
|
||||
@export var options_packed_scene : PackedScene
|
||||
@export_file("*.tscn") var main_menu_scene : String
|
||||
|
||||
@export var menu_context : GUIDEMappingContext
|
||||
|
||||
var popup_open : Node
|
||||
var previous_mapping_contexts : Array
|
||||
|
||||
var is_listening_to_inputs = true
|
||||
|
||||
func _enter_tree() -> void:
|
||||
super._enter_tree()
|
||||
previous_mapping_contexts = GUIDE.get_enabled_mapping_contexts()
|
||||
for previous_context in previous_mapping_contexts:
|
||||
GUIDE.disable_mapping_context(previous_context)
|
||||
GUIDE.enable_mapping_context(menu_context)
|
||||
|
||||
func _exit_tree() -> void:
|
||||
GUIDE.disable_mapping_context(menu_context)
|
||||
for previous_context in previous_mapping_contexts:
|
||||
GUIDE.enable_mapping_context(previous_context)
|
||||
|
||||
func close_popup() -> void:
|
||||
if popup_open != null:
|
||||
popup_open.hide()
|
||||
@@ -76,8 +61,6 @@ func _ready() -> void:
|
||||
_hide_exit_for_web()
|
||||
_hide_options_if_unset()
|
||||
_hide_main_menu_if_unset()
|
||||
|
||||
back_action.triggered.connect(_handle_cancel_input)
|
||||
|
||||
func _on_restart_button_pressed() -> void:
|
||||
%ConfirmRestart.popup_centered()
|
||||
|
||||
Reference in New Issue
Block a user