Skip to content

Swing Timer: spark width, overhang and per-weapon colors - #2733

Merged
EllesmereGaming merged 2 commits into
EllesmereGaming:mainfrom
necessaryisgoat:swing-timer-spark-colors
Oct 17, 2026
Merged

EllesmereGaming merged 2 commits into
EllesmereGaming:mainfrom
necessaryisgoat:swing-timer-spark-colors

Conversation

@necessaryisgoat

Copy link
Copy Markdown
Contributor

What does this PR do?

The Swing Timer's Show Spark toggle gets a Spark cog:

  • Width: the spark's width (default 8, the size every EUI spark already uses).
  • Overhang: how far the spark reaches past the bar's top and bottom, in screen pixels (default 0). When the spark overhangs, it moves into its own clip frame, built the first time it's needed, so it's still cut off at the bar's ends.
  • Main Hand / Off Hand / Ranged Color: a spark color for each weapon, so each swing is easy to tell apart. Unset, a spark stays white and a combined off hand's spark keeps its fill color.

Existing profiles look the same until one of these is changed.

How was it tested?

Tested in game on the WoW Forever client (the Swing Timer only exists there). .tools/guardrails.py passes.

Screenshots

New cogwheel in the Swing Timer options:
new option unclicked
new option clicked

Default Spark (same as before):
before and default spark

Default sizes recolored red (subtle):
recolored red spark

Minor overhang (5px red):
5 red overhang

15 overhang:
15 red overhang

24 overhang (max value lol):
24 (max) red overhang

Max width:
max red width

Different colors on ranged and melee displayed:
Screenshot 2026-10-16 164629

Checklist

  • New settings default OFF (no behavior change without opt-in): Width defaults to today's 8, Overhang to 0, and the colors are unset, so the bar looks the same until they're changed.
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no tickers; nothing built beyond an inert event frame or combat queue. The overhang clip frame is only built once Overhang is above 0.
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations). The settings are applied in the look pass only, with nothing per frame.
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames. Only the Swing Timer's own frames are touched.
  • Tested in-game on live; no version gates or pre-Midnight APIs added. Tested on the WoW Forever client, where the Swing Timer runs.

Show Spark gets a Spark cog:

- Width: the spark's width (default 8, the size every EUI spark uses).
- Overhang: how far the spark reaches past the bar's top and bottom, in
  screen pixels (default 0). An overhanging spark leaves the bar's clip
  for a clip of its own, built on first use, that still cuts it at the
  bar's ends.
- Main Hand / Off Hand / Ranged Color: each weapon's spark color. Unset,
  a spark stays white and a combined off hand's spark keeps its fill
  color, so existing profiles look the same.
main's _keys.txt lists 1308 keys but its header still says 1306 (a
merge left it stale), so the locale-keys check fails on every Lua PR.
Regenerated with .tools/extract-locale-keys.sh; no key lines change.
@EllesmereGaming
EllesmereGaming merged commit 7314db1 into EllesmereGaming:main Oct 17, 2026
2 checks passed
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.

2 participants