mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
added in pause button rebinding
This commit is contained in:
@@ -36,7 +36,8 @@ var file := {
|
||||
"move_up": "Up",
|
||||
"move_down": "Down",
|
||||
"ui_accept": "Z",
|
||||
"ui_back": "X"
|
||||
"ui_back": "X",
|
||||
"pause": "Escape"
|
||||
},
|
||||
"controller":
|
||||
{
|
||||
@@ -48,7 +49,8 @@ var file := {
|
||||
"move_up": "1,-1",
|
||||
"move_down": "1,1",
|
||||
"ui_accept": 0,
|
||||
"ui_back": 1
|
||||
"ui_back": 1,
|
||||
"pause": 6
|
||||
},
|
||||
"visuals":
|
||||
{
|
||||
|
@@ -75,10 +75,10 @@ func _input(event: InputEvent) -> void:
|
||||
if event.is_pressed() == false:
|
||||
return
|
||||
|
||||
if event is InputEventKey:
|
||||
if event.as_text_physical_keycode() == "Escape":
|
||||
cancel_remap()
|
||||
return
|
||||
#if event is InputEventKey:
|
||||
#if event.as_text_physical_keycode() == "Escape":
|
||||
#cancel_remap()
|
||||
#return
|
||||
|
||||
if type == 0 and event is InputEventKey:
|
||||
map_event_to_action(event)
|
||||
@@ -90,7 +90,7 @@ func _input(event: InputEvent) -> void:
|
||||
func map_event_to_action(event) -> void:
|
||||
for action_name in action_names:
|
||||
var action = action_name
|
||||
if action.contains("ui_") == false:
|
||||
if action.contains("ui_") == false and action != "pause":
|
||||
action = action_name + "_" + str(player_idx)
|
||||
var events = InputMap.action_get_events(action).duplicate()
|
||||
events[type] = event
|
||||
|
Reference in New Issue
Block a user