From b4a046026e687a3b44ce2be0cbab1150bd3545ca Mon Sep 17 00:00:00 2001 From: tpart Date: Tue, 30 Sep 2025 14:34:30 +0200 Subject: Store if correct explanation for input device was shown in profile --- client/gui/overlays/controls_visualization/explanation.gd | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'client/gui/overlays/controls_visualization/explanation.gd') diff --git a/client/gui/overlays/controls_visualization/explanation.gd b/client/gui/overlays/controls_visualization/explanation.gd index 47716a42..77147f1d 100644 --- a/client/gui/overlays/controls_visualization/explanation.gd +++ b/client/gui/overlays/controls_visualization/explanation.gd @@ -16,6 +16,8 @@ extends Menu class_name ControlsExplanation +var profile_name: String +var using_joypad: bool var two_handed: bool @onready var game: Game = $"../Game" @@ -25,15 +27,18 @@ var two_handed: bool @onready var controller_explanation: ControllerExplanation = $MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer/ControllerExplanation func _ready(): - two_handed = data + profile_name = data[0] + using_joypad = data[1] + two_handed = data[2] + @warning_ignore("incompatible_ternary") - var explanation: DeviceExplanation = controller_explanation if Global.using_joypad else keyboard_explanation + var explanation: DeviceExplanation = controller_explanation if using_joypad else keyboard_explanation explanation.visible = true explanation.toggle_double_handed(two_handed) title.text = tr("c.controls_explanation.two_handed") if two_handed else tr("c.settings.input") super() func _on_accept_pressed() -> void: - Profile.write("controls_" + ("two" if two_handed else "one") + "_handed_explained", true) + Profile.write(profile_name, true) game.mp.send_ready() exit() -- cgit v1.2.3-70-g09d2