This repository has been archived on 2024-07-02. You can view files and clone it, but cannot push or open issues or pull requests.
HoppyEaster/Scripts/UI/Remaping/RemapButton.gd

16 lines
336 B
GDScript3
Raw Normal View History

extends Button
@export var input_action_name : String
@export var remap_controller : Node
func _ready():
display_key()
func display_key ():
text = "%s" % InputMap.action_get_events(input_action_name)[0].as_text()
pass
func _on_pressed():
remap_controller.start_remap(self, input_action_name)
pass # Replace with function body.