mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
alr, multiple inputs are DONE
This commit is contained in:
@@ -74,6 +74,7 @@ func load_inputs() -> void:
|
|||||||
idx += 1
|
idx += 1
|
||||||
else:
|
else:
|
||||||
bind_value_to_event(i, value, 0)
|
bind_value_to_event(i, value, 0)
|
||||||
|
i.update_value()
|
||||||
|
|
||||||
func bind_value_to_event(input_node, value, idx := 0) -> void:
|
func bind_value_to_event(input_node, value, idx := 0) -> void:
|
||||||
var event: InputEvent = null
|
var event: InputEvent = null
|
||||||
@@ -852,6 +853,7 @@ type = 1
|
|||||||
[node name="Pause" parent="PanelContainer/MarginContainer/VBoxContainer/Controller" groups=["Options"] instance=ExtResource("9_ksnto")]
|
[node name="Pause" parent="PanelContainer/MarginContainer/VBoxContainer/Controller" groups=["Options"] instance=ExtResource("9_ksnto")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
settings_category = "controller"
|
settings_category = "controller"
|
||||||
|
can_bind_escape = true
|
||||||
action_names = ["pause"]
|
action_names = ["pause"]
|
||||||
title = "PAUSE"
|
title = "PAUSE"
|
||||||
type = 1
|
type = 1
|
||||||
|
@@ -3,6 +3,7 @@ extends HBoxContainer
|
|||||||
|
|
||||||
@export var settings_category := "video"
|
@export var settings_category := "video"
|
||||||
@export var selected := false
|
@export var selected := false
|
||||||
|
@export var can_bind_escape := false
|
||||||
|
|
||||||
@export var action_names := [""]
|
@export var action_names := [""]
|
||||||
@export var title := ""
|
@export var title := ""
|
||||||
@@ -90,10 +91,10 @@ func _input(event: InputEvent) -> void:
|
|||||||
if event.is_pressed() == false:
|
if event.is_pressed() == false:
|
||||||
return
|
return
|
||||||
|
|
||||||
#if event is InputEventKey:
|
if event is InputEventKey and not can_bind_escape:
|
||||||
#if event.as_text_physical_keycode() == "Escape":
|
if event.as_text_physical_keycode() == "Escape":
|
||||||
#cancel_remap()
|
map_event_to_action(null, current_binding_idx)
|
||||||
#return
|
return
|
||||||
|
|
||||||
if type == 0 and event is InputEventKey:
|
if type == 0 and event is InputEventKey:
|
||||||
map_event_to_action(event, current_binding_idx)
|
map_event_to_action(event, current_binding_idx)
|
||||||
|
Reference in New Issue
Block a user