refactor(ui): HudGroups z-index model + gameplay occlusion (D-170)

Replaced visibility toggling with z-index layer management. Nothing
gets hidden — fullscreen apps render on top, gameplay stays underneath.
Supports future hybrid layouts (insert-mode map alongside gameplay).

Added gameplay_occluded signal: WorldRenderer skips tile/fog/entity
updates when a fullscreen implant app covers it. Prevents wasted
render work behind opaque overlays. Other renderers can connect to
the same signal.

Modes: GAMEPLAY (z=0), INSERT (z=10), FULLSCREEN (z=20), MODAL (z=30).
Star map uses app_changed signal to toggle its own visibility based
on whether its app is active.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 11:21:31 +02:00
co-authored by Claude Opus 4.6
parent 09e0c522bd
commit 2e01081de7
4 changed files with 125 additions and 75 deletions
+5 -12
View File
@@ -62,20 +62,13 @@ func _ready() -> void:
camera.global_position = GameState.player_position * Constants.TILE_SIZE
_camera_anchored = true
# D-170: Register HUD nodes into visibility groups
# Gameplay group — hidden when implant panels are open
# D-170: Register HUD nodes into layer groups
for node in [
hud,
minimap,
stance_indicator,
interaction_prompt,
interaction_list,
inventory_grid,
news_ticker,
examine_display,
world_radial
hud, minimap, stance_indicator, interaction_prompt,
interaction_list, inventory_grid, news_ticker,
examine_display, world_radial, cursor_renderer,
]:
if node and node is Control:
if node and node is CanvasItem:
HudGroups.register(node, "gameplay")
# #775: Initialize extracted components