Skip to content

Commit

Permalink
Added workaround for Godot #42224
Browse files Browse the repository at this point in the history
The settings menu did not display the correct panel when exported.
  • Loading branch information
Poobslag committed Nov 22, 2020
1 parent dffcc94 commit 5e5c166
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion project/src/main/ui/keybind/settings-keybinds-control.gd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ func _refresh_keybind_labels() -> void:
$PresetScrollContainer.visible = false
$CustomScrollContainer.visible = false

match PlayerData.keybind_settings.preset:
# Workaround for Godot #42224 (https://github.com/godotengine/godot/issues/42224)
# The following match statement does not work unless this field is explicitly cast to an int
var preset: int = PlayerData.keybind_settings.preset

match preset:
KeybindSettings.GUIDELINE:
$PresetScrollContainer.visible = true
$PresetScrollContainer/VBoxContainer/MovePiece.value = "Left, Right, Numpad4/6"
Expand Down

0 comments on commit 5e5c166

Please sign in to comment.