diff options
Diffstat (limited to 'client/gui')
-rw-r--r-- | client/gui/overlays/controls_visualization/explanation.gd | 11 |
1 files changed, 8 insertions, 3 deletions
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() |