You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: innervate cooldown, spell reordering, and dead-state toggle (#12)
* feat: innervate cooldown, spell reordering, and dead-state toggle
- Add Innervate (180s) to Druid cooldowns in Data.lua
- Right-click any tracker row to toggle dead state: desaturates icon and
greys out the card to indicate the player has died; right-click again
to restore (battle rez). Timer continues running. /cdt reset clears all
dead states.
- Spell reordering via Settings panel: each ability row now has ▲/▼ arrow
buttons to move it up or down in the tracker. Order is persisted in the
new CooldownTrackerDB.spellOrder SavedVariable. A Reset Order button
restores the default sequence.
* fix: sort comparator strict ordering and stale spellOrder pruning
- Guard sort comparator against comparing an element with itself (a.id ==
b.id returns false immediately), fixing potential 'invalid order function'
runtime error in Lua 5.1 when spellOrder is empty.
- Prune stale spell IDs from spellOrder during BuildExpandedCooldowns so
ghost entries from renamed/removed spells can never silently consume swap
positions.
* fix: replace cramped scroll-bar arrow textures with UIPanelButton arrows
Reorder buttons were 22x15px scroll-bar textures with overlapping anchors
inside a 42px row. Replaced with UIPanelButtonTemplate buttons (24x18px
each, 2px gap) anchored correctly so they stack cleanly without overlap.
Switched arrow glyphs to unicode ▲/▼ which are far more legible at this
size.
* fix: use ASCII glyphs and center reorder buttons vertically in row
FRIZQT__.TTF lacks the Unicode geometric arrow codepoints, causing them
to render as boxes. Replaced with ASCII ^ and v which the font supports.
Anchored both buttons from the row RIGHT with +/-10 Y offsets so the
18+2+18px pair is centered in the 42px row instead of sitting at the top.
* fix: use native WoW arrow textures for reorder buttons
Replaced mismatched font glyphs (^ vs v render at different heights in
FRIZQT) with inline |T...|t texture escapes pointing at the same Arrow-Up
and Arrow-Down assets Blizzard uses in their own UI. Both arrows render at
12x12px so they are guaranteed identical in size.
* fix: center arrow textures in reorder buttons using child overlay
Inline |T|t text can't be offset, so asymmetric padding in the native
arrow textures made the up arrow hug the bottom and down arrow hug the
top. Replaced with explicit child OVERLAY textures anchored at CENTER
with +/-1 Y nudges to counteract the texture's internal whitespace.
* fix: increase down arrow Y nudge to -3 for visual centering
* fix: grey out timer and name text when player is marked dead
ApplyDeadVisuals now sets timerLabel, nameLabel, and classLabel to grey
(0.5, 0.5, 0.5) alongside the icon/strip/bg. ClearDeadVisuals restores
nameLabel to white and classLabel to its class colour. timerLabel is
restored implicitly by the UpdateRow tick which rewrites it each frame.
* fix: preserve active timers across RebuildUI calls
Removing CT.activeTimers = {} from RebuildUI() was wiping all running
timers every time a settings change (column count, class count, spell
visibility, reorder) triggered a rebuild. Timers are now only cleared
explicitly by the /cdt reset slash command, which is the only caller
that actually intends to reset them. Orphaned entries from ID changes
(e.g. count 1→2) are harmless -- UpdateRow ignores keys with no
matching row.
* fix: use grey color codes in timer text for dead-state rows
SetTextColor() is overridden by embedded |cff...|r escape sequences in
the text string. UpdateRow now reads CT.deadStates each tick and injects
|cff808080 instead of the normal green/orange codes, so the grey sticks
regardless of timer state. Works whether dead is marked before or after
the timer starts since UpdateRow fires every frame.
* docs: update README for innervate, reorder, and dead-state features
* fix: prune stale spellOrder IDs in MoveSpell and drop RebuildUI timer flash
- MoveSpell now rebuilds the order array by removing any IDs not in
CT.COOLDOWNS before searching for the swap position, matching the
knownIds pruning already present in BuildExpandedCooldowns. Previously
a ghost entry could silently consume a swap slot.
- RebuildUI no longer unconditionally overwrites timerLabel with 'Ready'.
UpdateRow handles the correct text (respecting active timers and dead
state) on the next OnUpdate tick, eliminating the one-frame green flash
when reordering while a timer is running.
3.**Slash Commands:** Register slash commands via the `SlashCmdList` table. Handle arguments cleanly.
68
69
4.**No Third-Party Libraries:** The addon intentionally does not use Ace3 or other framework libraries to remain lightweight. Rely on the standard WoW API.
0 commit comments