CastArchitect (Castbar)

A visual cast bar builder for Midnight.

File Details

CastArchitect v1.4.2.zip

  • R
  • May 24, 2026
  • 2.42 MB
  • 0
  • 12.0.7+3
  • Retail

File Name

CastArchitect v1.4.2.zip

Supported Versions

  • 12.0.7
  • 12.0.5
  • 12.0.1
  • 12.0.0

CastArchitect v1.4.0

Major feature release. Three independent features shipped together after joint development across GUI, Display, and Core modules.


NEW: Target Cast Bar

(@Display/ExtraCastBars.lua@ - full rewrite from disabled skeleton)

  • Tracks UNIT_SPELLCAST_* events for the "target" unit.
  • Full feature parity with the player bar: font, texture, color, alpha, border, icon position (including iconInside / CombinedBorder), bar dimensions, smooth lerp, early-stop tolerance, success flash, fade-out.
  • Reads configuration from profile.target (sub-table added to the profile schema in @Core/Initialize.lua@ defaults; existing profiles receive defaults on first load via the schema version 2 migration path).
  • isSuppressedByContext() guard shared with the player bar (vehicle, pet battle).
  • Drag-unlock mover uses ns.NotifyMoverDragged("target") to push updated offsets back into the MoverPanel sliders.
  • Uses ns.WidgetLayout for all widget positioning - same helper table as the player bar, exposed from @Display/CastBar.lua@.

NEW: Per-Character / Per-Spec Profile Binding

(@Core/CharacterBindings.lua@)

  • CastArchitectDB.characterBindings[charKey] stores { default, specs = {} }.
  • Key format: charKey = "CharName-Realm".
  • getEffectiveProfile(charKey, specID): spec-level binding takes priority over char-level default.
  • applyForCurrent() defers 0.5 s if InCombatLockdown(); otherwise applies immediately.
  • Events tracked: PLAYER_LOGIN, PLAYER_SPECIALIZATION_CHANGED, ACTIVE_TALENT_GROUP_CHANGED.
  • UI in Profiles section of @GUI/Main.lua@: character dropdown (current char pre-selected), spec dropdowns built from GetNumSpecializations(), per-entry "Remove" buttons, live preview of effective profile.

NEW: Dual-Bar Positioning Popup

(@GUI/MoverPanel.lua@)

  • 340x326 px floating frame, BackdropTemplate, draggable.
  • Player / Target tab row backed by ns.GetActiveBarContext() / ns.SetBarContext(); tab state syncs with the main editor's pill row.
  • Four sliders via ns.CreateSlider: xOffset, yOffset, width, height.
  • ns.NotifyMoverDragged(unit) callback refreshes slider values when the in-world bar is dragged.
  • ns.OnBarContextChanged listener repaints tab accent on context switch.
  • Position persisted in CastArchitectDB.moverPanel = { x, y }.

INTERNAL

  • ns.WidgetLayout table exposed from @Display/CastBar.lua@: getOffsets, getPositionMode, getAnchorId, resolveOffset, justifyFromAnchor, handlePointFromJustify, applyUsableEdge, roundToInt.
  • profileProxy in @GUI/Main.lua@ routes __index / __newindex to profile.target for target-scoped keys when state.activeBarContext == "target".
  • Theme system extended: colors.targetAccent, activeAccent(), activeAccentBright(), registerThemeApplier(), refreshTheme(), fireBarContextChanged().
  • Public APIs: ns.SetBarContext, ns.GetActiveBarContext, ns.OnBarContextChanged, ns.ActiveAccent, ns.ActiveAccentBright, ns.RegisterThemeApplier.
  • Copy Styling POSITION_KEYS trimmed to bar-screen-position exclusions only; widget layout keys (anchor, offsets, padding) are now included in copies.
  • StaticPopup export payload passed as 4th arg to StaticPopup_Show to avoid OnShow firing before popup.data is set.
  • Profile import sandboxed with setfenv; 65536-byte size cap; sentinel key validation before applying.