Files
GGJ26/menus/scenes/game_scene/input_display_label.gd
minimata 44f251ed66
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 6s
Create tag and build when new code gets to main / Export (push) Successful in 1m1s
Basic game template addon
2026-01-30 19:45:56 +01:00

22 lines
515 B
GDScript

extends Label
@onready var action_names := AppSettings.get_action_names()
func _get_inputs_as_string() -> String:
var all_inputs : String = ""
var is_first : bool = true
for action_name in action_names:
if Input.is_action_pressed(action_name):
if is_first:
is_first = false
all_inputs += action_name
else:
all_inputs += " + " + action_name
return all_inputs
func _process(_delta : float) -> void:
if Input.is_anything_pressed():
text = _get_inputs_as_string()
else:
text = ""