From 44cc8cda4c7f4bdf412376715fc903c0d4b3acac Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 5 Apr 2026 10:57:35 +0200 Subject: [PATCH] fix(ui): data rows clip to one line, panel clamped to screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- client/ui/implant/implant_data_row.gd | 3 ++- client/ui/star_map.gd | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/client/ui/implant/implant_data_row.gd b/client/ui/implant/implant_data_row.gd index ebe6add28..f622f6e35 100644 --- a/client/ui/implant/implant_data_row.gd +++ b/client/ui/implant/implant_data_row.gd @@ -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 diff --git a/client/ui/star_map.gd b/client/ui/star_map.gd index 93bf08e3b..94aad9aa0 100644 --- a/client/ui/star_map.gd +++ b/client/ui/star_map.gd @@ -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()