working keyboard and plugin for better tilemaps

This commit is contained in:
2025-10-17 01:00:19 +02:00
parent 69c3e6f396
commit 191235da54
42 changed files with 2274 additions and 11 deletions

View File

@@ -1 +1,33 @@
extends Control
signal text_changed
signal key_pressed
@onready var main_keys: HFlowContainer = $MainKeys
@onready var text_label: Label = $TextLabel
@export var text: String = "":
set(value):
text = value
text_label.text = text
text_changed.emit()
var shifting: bool = true
func _ready() -> void:
for key: Button in main_keys.get_children():
key.connect("pressed", func():
key_pressed.emit()
match key.name:
"UShift":
shifting = !shifting
for i_key: Button in main_keys.get_children():
if shifting:
i_key.text = i_key.text.to_upper()
else:
i_key.text = i_key.text.to_lower()
"USpace":
text += " "
_:
text += key.text
)