clear labels at ready

This commit is contained in:
Teatov 2025-07-28 20:31:07 +10:00
parent 90bbd2ced5
commit ed197efcd2

View File

@ -31,7 +31,7 @@ static func instantiate_with_props(
func _ready() -> void:
_mesh.scale.x = props.width_ratio
_set_labels()
_clear_labels()
func _process(_delta: float) -> void:
@ -51,7 +51,6 @@ func _unhandled_input(event: InputEvent) -> void:
return
_is_pressed = event_key.is_pressed()
# scale.z = 0.75 if _is_pressed else 1.0
if keyboard.configuring and _is_pressed:
if not keyboard.alt_layout:
@ -67,14 +66,17 @@ func _unhandled_input(event: InputEvent) -> void:
_set_labels()
func _set_labels() -> void:
func _clear_labels()->void:
_upper_left_label.text = ""
_upper_right_label.text = ""
_lower_left_label.text = ""
_lower_right_label.text = ""
_center_label.text = ""
func _set_labels() -> void:
_clear_labels()
var main_char := (
char(props.input_event_main.unicode).to_upper()
if props.input_event_main