can quit menus using B button
This commit is contained in:
@@ -6,6 +6,9 @@ extends Control
|
||||
@export var options_packed_scene : PackedScene
|
||||
@export var credits_packed_scene : PackedScene
|
||||
|
||||
@export var menu_context : GUIDEMappingContext
|
||||
@export var back_action : GUIDEAction
|
||||
|
||||
var options_scene
|
||||
var credits_scene
|
||||
var sub_menu
|
||||
@@ -73,7 +76,12 @@ func _ready() -> void:
|
||||
_add_or_hide_options()
|
||||
_add_or_hide_credits()
|
||||
_hide_new_game_if_unset()
|
||||
|
||||
_setup_inputs()
|
||||
|
||||
func _setup_inputs() -> void:
|
||||
GUIDE.enable_mapping_context(menu_context)
|
||||
back_action.triggered.connect(_on_back_button_pressed)
|
||||
|
||||
func _on_new_game_button_pressed() -> void:
|
||||
new_game()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user