refactor(ui): add implant container frame to minimap (#787)

Draw ImplantTheme-styled StyleBoxFlat behind the circular minimap for
visual consistency with other implant components. Stance badge icons
remain blocked by #795 (visual team).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 12:52:06 +02:00
co-authored by Claude Opus 4.6
parent 283518d332
commit b2b67d52f8
+19
View File
@@ -35,11 +35,25 @@ const COLOR_CARDINAL: Color = Color(0.784, 0.816, 0.878, 0.4) # Dimmer E/S/W ti
const COLOR_PLAYER: Color = Constants.ENTITY_COLOR_PLAYER
var _insert_active: bool = true
# D-169: StyleBoxFlat matching ImplantPanel aesthetic — drawn as container frame behind the circle.
var _container_style: StyleBoxFlat = null
func _ready() -> void:
mouse_filter = Control.MOUSE_FILTER_IGNORE
set_process(true)
_init_container_style()
func _init_container_style() -> void:
var t := load("res://ui/implant/default_implant.tres") as ImplantTheme
if not t:
return
_container_style = StyleBoxFlat.new()
_container_style.bg_color = t.panel_bg
_container_style.border_color = t.separator
_container_style.set_border_width_all(int(t.border_width))
_container_style.set_content_margin_all(0)
func _process(_delta: float) -> void:
@@ -55,6 +69,11 @@ func set_insert_active(active: bool) -> void:
func _draw() -> void:
# D-169: ImplantPanel-style container frame behind the circular minimap.
# Gives the minimap the same panel border aesthetic as other implant components.
if _container_style:
_container_style.draw(get_canvas_item(), Rect2(Vector2.ZERO, get_rect().size))
var sz: Vector2 = get_rect().size
var center := sz / 2.0
# Outer radius: fill control with 1px edge padding