gd: added input addon

This commit is contained in:
2025-05-27 19:20:46 +02:00
parent d8a1604af9
commit c8d8c7ec25
683 changed files with 21608 additions and 2 deletions

View File

@ -0,0 +1,17 @@
@tool
extends GUIDEIconRenderer
@onready var _label:Label = %Label
func supports(input:GUIDEInput) -> bool:
return input is GUIDEInputKey
func render(input:GUIDEInput) -> void:
var key:Key = input.key
var label_key:Key = DisplayServer.keyboard_get_label_from_physical(key)
_label.text = OS.get_keycode_string(label_key).strip_edges()
size = Vector2.ZERO
call("queue_sort")
func cache_key(input:GUIDEInput) -> String:
return "ed6923d5-4115-44bd-b35e-2c4102ffc83e" + input.to_string()