feat: add UI minimap and accessibility controls

This commit is contained in:
goose
2026-10-03 23:23:36 -04:00
parent 6697c05b56
commit 9f43e187d3
21 changed files with 610 additions and 4 deletions
+24
View File
@@ -0,0 +1,24 @@
class_name HelpPanel
extends PanelContainer
const InputBindingsType = preload("res://scripts/game/input_bindings.gd")
@onready var body: RichTextLabel = $Body
func present() -> void:
visible = true
refresh()
func dismiss() -> void:
visible = false
func refresh() -> void:
var lines: PackedStringArray = ["Commandes", ""]
for action: StringName in InputBindingsType.input_actions():
var events := InputMap.action_get_events(action)
var binding := "—"
if not events.is_empty() and events[0] is InputEventKey:
binding = OS.get_keycode_string((events[0] as InputEventKey).physical_keycode)
lines.append("%s — %s" % [binding, InputBindingsType.help_name_for(action)])
lines.append("\nF1 / ? — fermer")
body.text = "\n".join(lines)