fix(ui): cursor z-index 100, adjacent wraps, panel clamp with reset_size
- CursorRenderer z_index=100 so it renders above all HUD/implant layers - Adjacent systems uses ImplantTextBlock (wraps) instead of ImplantDataRow (clips) - Panel calls reset_size() before clamping to get accurate height on first frame Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -56,6 +56,7 @@ var _alpha: float = 0.45
|
||||
|
||||
func _ready() -> void:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
z_index = 100 # D-170: cursor must always render above all HUD/implant layers
|
||||
_from = _snapshot()
|
||||
|
||||
|
||||
|
||||
@@ -345,11 +345,13 @@ func _draw() -> void:
|
||||
if _info_panel:
|
||||
_info_panel.visible = _selected_system != ""
|
||||
if _info_panel.visible:
|
||||
# Force layout so size.y is accurate for clamping
|
||||
_info_panel.reset_size()
|
||||
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:
|
||||
if panel_h > 0.0 and py + panel_h > sz.y - POPUP_MARGIN:
|
||||
py = sz.y - panel_h - POPUP_MARGIN
|
||||
px = maxf(POPUP_MARGIN, px)
|
||||
py = maxf(POPUP_MARGIN, py)
|
||||
@@ -519,7 +521,7 @@ func _rebuild_info_panel() -> void:
|
||||
var neighbor: Dictionary = _node_lookup.get(neighbor_id, {})
|
||||
var n_name: String = neighbor.get("proper_name", "")
|
||||
adj_names.append(n_name if not n_name.is_empty() else neighbor_id)
|
||||
_info_panel.add_component(ImplantDataRow.new(" · ".join(adj_names)))
|
||||
_info_panel.add_component(ImplantTextBlock.new(" · ".join(adj_names)))
|
||||
|
||||
|
||||
func _draw_title() -> void:
|
||||
|
||||
Reference in New Issue
Block a user