fix(ui): gdlint ordering — signals before enums, signal uses int for Mode

Moved signals above enum per gdlint class-definitions-order rule.
app_changed signal uses int instead of Mode type to avoid the
forward-reference that forced wrong ordering. Callers compare
against HudGroups.Mode.FULLSCREEN etc unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 11:25:22 +02:00
co-authored by Claude Opus 4.6
parent 2e01081de7
commit ffef2b3d54
3 changed files with 13 additions and 16 deletions
+11 -12
View File
@@ -22,6 +22,15 @@ extends Node
## HudGroups.close_app()
## HudGroups.toggle_app("implant/map/starchart")
## Emitted when an app opens, closes, or changes mode.
## mode is a HudGroups.Mode enum value.
signal app_changed(app_path: String, mode: int)
## Emitted when gameplay rendering should pause or resume.
## Fullscreen implant apps occlude gameplay — expensive renderers (world,
## fog, entities) should skip draw calls while this is true.
signal gameplay_occluded(occluded: bool)
enum Mode { GAMEPLAY, INSERT, FULLSCREEN }
## Z-index values for each mode. Gameplay is the base layer.
@@ -30,18 +39,8 @@ const Z_INSERT: int = 10
const Z_FULLSCREEN: int = 20
const Z_MODAL: int = 30
## Emitted when an app opens, closes, or changes mode.
## Listeners can use this to adapt their layout (e.g. resize to fullscreen).
signal app_changed(app_path: String, mode: Mode)
## Emitted when gameplay rendering should pause or resume.
## Fullscreen implant apps occlude gameplay — expensive renderers (world,
## fog, entities) should skip draw calls while this is true.
## Connect from any renderer: HudGroups.gameplay_occluded.connect(_on_occluded)
signal gameplay_occluded(occluded: bool)
var _groups: Dictionary = {} # group_path -> Array[CanvasItem]
var _active_app: String = "" # currently focused implant app ("" = none)
var _groups: Dictionary = {} # group_path -> Array[CanvasItem]
var _active_app: String = "" # currently focused implant app ("" = none)
var _active_mode: Mode = Mode.GAMEPLAY
+1 -3
View File
@@ -14,6 +14,7 @@ extends Node2D
# FogOverlay (Node2D) — z:900 fog shader (OUTSIDE FogGroup)
var _last_tick: int = -1
var _occluded: bool = false # D-170: skip rendering when fullscreen implant app is covering us
@onready var tile_renderer = $FogGroup/FloorTiles
@onready var fog_renderer = $FogOverlay
@@ -21,9 +22,6 @@ var _last_tick: int = -1
@onready var sound_indicator_renderer = $SoundIndicators # #126 D-018 medium-range indicators
var _occluded: bool = false # D-170: skip rendering when fullscreen implant app is covering us
func _ready() -> void:
HudGroups.gameplay_occluded.connect(_on_gameplay_occluded)
print("WorldRenderer: Initialized (D-049 z-stack)")
+1 -1
View File
@@ -149,7 +149,7 @@ func toggle_visible() -> void:
## Respond to app layer changes (D-170).
func _on_app_changed(app_path: String, mode: HudGroups.Mode) -> void:
func _on_app_changed(app_path: String, mode: int) -> void:
if app_path != "implant/map/starchart":
return
if mode == HudGroups.Mode.FULLSCREEN or mode == HudGroups.Mode.INSERT: