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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user