Skip to content

Fix cooldown swipe direction: decide per icon category#27

Open
choppaoops wants to merge 1 commit into
Lardeck:mainfrom
choppaoops:main
Open

Fix cooldown swipe direction: decide per icon category#27
choppaoops wants to merge 1 commit into
Lardeck:mainfrom
choppaoops:main

Conversation

@choppaoops

Copy link
Copy Markdown

Problem

ApplyCooldownSwipe sets the swipe reverse from a single global
reverseActiveSwipe toggle. No single value is correct for every icon, because
the categories want different directions:

  • Buff icon viewers (SCMBuffOptions) read best counting down
    bright → dark — the dark swipe grows as the buff expires.
  • Icons showing an active aura use Blizzard's native active swipe, which
    already shrinks to show remaining time. They must not be reversed —
    reversing makes the highlight grow instead of shrink.
  • Icons on cooldown count down dark → bright.

With one global flag, enabling it fixes buff icon viewers but flips the active
swipe the wrong way; disabling it does the reverse. There is no setting that gets
both right.

Fix

Decide the reverse value from the icon category instead of the global flag. Only
buff icon viewers reverse; icons showing an active aura and icons on cooldown keep
the default direction:

local isBuffViewer = parent.SCMBuffOptions and true or false
-- ... in the aura / buff branch:
cooldownFrame:SetReverse(isBuffViewer)
-- ... on-cooldown branches:
cooldownFrame:SetReverse(false)

Color handling (recolorActiveSwipe, recolorNormalSwipe, the color pickers,
disableRegularIconActiveSwipe) is unchanged — this only touches direction.

Notes

  • The reverseActiveSwipe option is no longer read; its checkbox can be removed
    from the options panel (or kept as a no-op). No defaults change is required.
  • Verified on Essential / Utility / BuffIcon viewers: icons on cooldown sweep
    dark→bright, buff icon viewers sweep bright→dark, and the native active swipe
    shrinks correctly.

Fix cooldown swipe direction: decide per icon category
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