fix(ui): HUD layout pass — resolve overlapping elements (#792)
- HUD status panel moved to y=80 (below TimeDisplay at 16-70) - Removed redundant time row from HUD (TimeDisplay handles it) - Debug overlay starts at y=150 (below HUD status panel) - Stance indicator moved below minimap (y=192, was overlapping at y=16) - Interaction prompt moved to y=-240 (above dialogue box at -200) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+5
-16
@@ -1,13 +1,11 @@
|
||||
extends Control
|
||||
|
||||
## HUD — implant-styled status panel (D-169, D-170).
|
||||
## Displays health, perception mode, time in an ImplantPanel.
|
||||
## Displays health and perception mode. Time is handled by TimeDisplay.
|
||||
|
||||
var _panel: ImplantPanel
|
||||
var _health_row: ImplantDataRow
|
||||
var _perception_row: ImplantDataRow
|
||||
var _time_row: ImplantDataRow
|
||||
var _theme: ImplantTheme
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@@ -16,25 +14,23 @@ func _ready() -> void:
|
||||
if old:
|
||||
old.queue_free()
|
||||
|
||||
_theme = load("res://ui/implant/default_implant.tres") as ImplantTheme
|
||||
var theme_res := load("res://ui/implant/default_implant.tres") as ImplantTheme
|
||||
|
||||
_panel = ImplantPanel.new()
|
||||
_panel.name = "StatusPanel"
|
||||
_panel.theme_resource = _theme
|
||||
_panel.theme_resource = theme_res
|
||||
_panel.custom_minimum_size.x = 200.0
|
||||
_panel.size.x = 200.0
|
||||
_panel.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
_panel.position = Vector2(16, 16)
|
||||
_panel.position = Vector2(16, 80) # below TimeDisplay (occupies 16-70)
|
||||
add_child(_panel)
|
||||
_panel.move_child(_panel.get_node("Content"), 0) # ensure content is first
|
||||
_panel.move_child(_panel.get_node("Content"), 0)
|
||||
|
||||
_health_row = ImplantDataRow.new("Health: 100")
|
||||
_perception_row = ImplantDataRow.new("Mode: Baseline")
|
||||
_time_row = ImplantDataRow.new("Time: 08:00")
|
||||
|
||||
_panel.add_component(_health_row)
|
||||
_panel.add_component(_perception_row)
|
||||
_panel.add_component(_time_row)
|
||||
|
||||
print("HUD: Initialized")
|
||||
|
||||
@@ -47,13 +43,6 @@ func update_from_hud_data(data: Dictionary) -> void:
|
||||
else:
|
||||
_perception_row.text = prefix + ": " + data.perception_mode.capitalize()
|
||||
|
||||
if data.has("time"):
|
||||
var prefix := UIStrings.get_text("hud.time_prefix")
|
||||
if prefix.is_empty():
|
||||
_time_row.text = data.time
|
||||
else:
|
||||
_time_row.text = prefix + ": " + data.time
|
||||
|
||||
|
||||
func update_health(health: int) -> void:
|
||||
_health_row.text = UIStrings.get_text("hud.health") + ": " + str(health)
|
||||
|
||||
Reference in New Issue
Block a user