fix chat ui

This commit is contained in:
2026-01-11 14:26:22 +01:00
parent 7b030cb3af
commit ab16194c39
4 changed files with 96 additions and 32 deletions

View File

@@ -117,7 +117,7 @@ func _send_and_close_chat():
# Update background visibility
_update_background_visibility()
func _on_chat_input_submitted(text: String):
func _on_chat_input_submitted(_text: String):
_send_and_close_chat()
func _on_chat_input_focus_exited():

View File

@@ -24,7 +24,7 @@ func _ready():
info_label.name = "InfoLabel"
info_label.add_theme_color_override("font_color", Color.WHITE)
info_label.add_theme_font_size_override("font_size", 20)
info_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT
info_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT # Text grows from right to left
# Load standard_font.png as bitmap font
var standard_font_resource = null
@@ -35,13 +35,13 @@ func _ready():
add_child(info_label)
# Position in top right
info_label.anchor_left = 1.0
info_label.anchor_right = 1.0
info_label.offset_left = -200
info_label.offset_right = -10
info_label.offset_top = 10
info_label.offset_bottom = 100
# Anchor to top right corner - text grows from right to left
# set_anchors_preset automatically sets layout_mode to anchors
info_label.set_anchors_preset(Control.PRESET_TOP_RIGHT)
info_label.offset_left = -400 # Width of label (grows leftward) - increased for longer text like "CLIENT" and large IDs
info_label.offset_right = -10 # Right edge at 10px from screen edge
info_label.offset_top = 10 # Top edge at 10px from screen top
info_label.offset_bottom = 150 # Height of label - increased for multiple lines
func _process(_delta):
# Toggle debug with F3