-
-
Save ijoschek/edd0308d7661bcae2cb277312549befa to your computer and use it in GitHub Desktop.
godot_custom_keybind_tut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func _ready(): | |
_set_keys() | |
func _set_keys(): | |
for j in ACTIONS: | |
get_node("Panel/ScrollContainer/VBoxContainer/HBoxCont_" + str(j) + "/Button").set_pressed(false) | |
if !InputMap.get_action_list(j).empty(): | |
get_node("Panel/ScrollContainer/VBoxContainer/HBoxCont_" + str(j) + "/Button").set_text(InputMap.get_action_list(j)[0].as_text()) | |
else: | |
get_node("Panel/ScrollContainer/VBoxContainer/HBoxCont_" + str(j) + "/Button").set_text("No Button!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment