fix(ui): data rows clip to one line, panel clamped to screen

ImplantDataRow uses clip_text + ellipsis instead of wrapping — each
info item stays on one line. Panel position clamped so bottom edge
never exceeds screen bounds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 10:57:35 +02:00
co-authored by Claude Opus 4.6
parent f0c6e97742
commit 44cc8cda4c
2 changed files with 12 additions and 4 deletions
+2 -1
View File
@@ -10,7 +10,8 @@ func _init(text: String = "", color: Color = Color.TRANSPARENT) -> void:
self.text = text
_color_override = color
mouse_filter = Control.MOUSE_FILTER_IGNORE
autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
clip_text = true
text_overrun_behavior = TextServer.OVERRUN_TRIM_ELLIPSIS
size_flags_horizontal = Control.SIZE_FILL
+10 -3
View File
@@ -317,12 +317,19 @@ func _draw() -> void:
if _selected_system != "":
_draw_selection(center)
# Info panel positioned in top-right (D-169 component panel)
# Info panel positioned in top-right, clamped to screen (D-169)
if _info_panel:
_info_panel.visible = _selected_system != ""
if _info_panel.visible:
_info_panel.position = Vector2(
sz.x - POPUP_WIDTH - POPUP_MARGIN, POPUP_MARGIN)
var px: float = sz.x - POPUP_WIDTH - POPUP_MARGIN
var py: float = POPUP_MARGIN
# Clamp to keep panel fully on screen
var panel_h: float = _info_panel.size.y
if py + panel_h > sz.y - POPUP_MARGIN:
py = sz.y - panel_h - POPUP_MARGIN
px = maxf(POPUP_MARGIN, px)
py = maxf(POPUP_MARGIN, py)
_info_panel.position = Vector2(px, py)
# Title
_draw_title()