Skip to content

[CastBars] new per-state colour pickers ("Color", "Channeling Color", and "Uninterruptible Color"); some bug fixes#434

Open
maxzaleski wants to merge 2 commits into
EllesmereGaming:mainfrom
maxzaleski:castbar-colours
Open

[CastBars] new per-state colour pickers ("Color", "Channeling Color", and "Uninterruptible Color"); some bug fixes#434
maxzaleski wants to merge 2 commits into
EllesmereGaming:mainfrom
maxzaleski:castbar-colours

Conversation

@maxzaleski

@maxzaleski maxzaleski commented Jun 22, 2026

Copy link
Copy Markdown

Summary Changes

  • Split the single cast bar fill-colour picker into three per-state pickers: "Color (default)", "Channeling Color", and
    "Uninterruptible Color"
  • Each picker has the full three-swatch layout (Gradient End, Custom Coloured, Class Coloured) plus a gradient cog
    (Enable Gradient + direction)
  • Uninterruptible takes priority over Channeling at runtime (a non-interruptible channel uses the Uninterruptible
    colour)
  • Added a Color / Channeling / Uninterruptible dropdown to the cast bar preview widget so each state can be previewed independently

Note

  • Interruptibility is fixed at cast start; there is no handling for the UNIT_SPELLCAST_NOT_INTERRUPTIBLE / UNIT_SPELLCAST_INTERRUPTIBLE mid-cast events on the player's own bar, which is acceptable as player cast interruptibility changes are rare and the castbar resets on each new cast.
  • Empowered casts (_empowering) fall through to the Default colour unless_notInterruptible is also set.

Bug Fixes

  • Fixed a bug where the preview widget did not apply the current colour selection (custom, class, gradient) on first
    render; it only updated on change
  • Fixed a bug where the Custom Coloured swatch appeared selected by default on per-state pickers even when no per-state colour had been explicitly set

Backwards Compatibility

No existing keys are renamed or removed. All new per-state keys default to nil and fall back to the base fillR/G/B/A, gradientR/G/B/A, classColored, gradientEnabled, and gradientDir values. Existing profiles are visually unchanged until a per-state colour is explicitly set.

Screenshots

Settings aaaa

…w state dropdown

Split the single cast bar fill-colour picker into three per-state pickers: Color
(default), Channeling Color, and Uninterruptible Color. Each picker uses the same
three-swatch layout (Gradient End, Custom Coloured, Class Coloured) and has its own
gradient cog (Enable Gradient + direction). Uninterruptible takes priority over
Channeling at runtime.

Added a Color / Channeling / Uninterruptible dropdown to the preview widget header so
each cast state can be previewed independently. Preview now correctly resolves the
current selection (custom, class, gradient) on first render.

Per-state DB keys (channelFillR/G/B/A, channelGradientR/G/B/A, channelClassColored,
channelGradientEnabled, channelGradientDir, and uninterrupt* equivalents) default to
nil and fall back to the base keys, so existing profiles are visually unchanged.
@maxzaleski maxzaleski marked this pull request as draft June 22, 2026 17:27
…in combat

GetStatusBarTexture() returns nil when the StatusBar value is 0 and the frame
has never been rendered (TWW behaviour). Cache the texture reference in _fillTex
immediately after SetStatusBarTexture in BuildCastBar, and use it in
ApplyCastFillColor as the primary source, falling back to GetStatusBarTexture()
for safety.
@maxzaleski maxzaleski marked this pull request as ready for review June 22, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant