Commit Graph

18 Commits

Author SHA1 Message Date
Narcasung 1a62b4ed1f Skin the options the CoA client adds to Interface, Video and Audio
ElvUI skins the stock options windows from four hardcoded name lists, so
every widget the client added since upstream last synced stays native --
53 of them here, 39 in four panels upstream never enumerated at all
(Battlenet, RaidEffects, Stereo, Voice). Reported cases were the Auto
Accept Trades checkbox and the Spell Queue Window slider.

Sweep the three panel containers on show and skin by object type instead
of carrying a parallel name list that would go stale the same way.

Panels belonging to other addons are skipped by matching frames against
INTERFACEOPTIONS_ADDONCATEGORIES, rebuilt on every sweep so a
load-on-demand addon that registers late is still caught.

Two guards worth naming. Sliders are gated on frame.template because
HandleSliderFrame has no idempotence check of its own and HookScript
stacks, so a second pass over one ElvUI already skinned would run its
OnDisable/OnEnable handlers twice. Dropdowns are detected structurally,
by a Middle texture plus a Button, because HandleDropDownBox uses that
button unguarded and a false positive is a Lua error rather than a
cosmetic miss.

No Button branch: nothing needs one, and it would flatten other addons'
panel tabs into ElvUI pill buttons.
2026-08-22 15:57:21 +02:00
Narcasung d2005c4725 Detect the dispel talents instead of asking for them
The three talents that grant an extra dispel type were gated behind
manual checkboxes because the talent state looked unreadable on this
server. It isn't: C_CharacterAdvancement.GetTalentRankByID reports a
live rank for the player, entry IDs are shared across every class tree
so querying a foreign one just reports rank 0, and
CHARACTER_ADVANCEMENT_UPDATE_ENTRIES_RESULT fires when a build is
confirmed.

Key the talents to their entry IDs and read them instead. The lookup is
cached, since PostUpdate_DebuffHighlight runs once per aura per frame,
and refreshed on build confirmation plus the existing delayed refresh
after login. Every call is guarded, so a missing API reads as "talent
not taken" and behaves as it did before.

The three checkboxes are gone, replaced by a single Detect Talents
switch that turns the whole lookup off.
2026-08-18 15:41:13 +02:00
Narcasung 01f1f5c7c3 Centre wardrobe tab labels and name the skin for what it covers
The label nudge in the shared tab handler exists to clear the icon on the
talent window's tabs, where the native anchor sits tight against it and
grown text would collide. The wardrobe's category tabs carry no icon and
centre their label, so the same nudge pushed every one of them off to the
right. It's now applied only to tabs that actually have a visible icon.

The settings entry covers three windows, so it's named for all three:
Advancement/Vanity/Wardrobe. The keys behind it move with it -- the db
table is skins.collections, after Collections, the container the three
windows and the tab row all hang off, and talentScale becomes
advancementScale. Nothing here has been released, so there's no stored
setting to migrate.
2026-08-17 22:41:25 +02:00
Narcasung 964f88559d Add a Talents skin entry with an enable switch and per-window scale
The talent window, the Vanity and Wardrobe windows it switches between and
the tab row along its bottom are one feature to the player, so they get one
entry in the Skins tree and one master switch gating all three
Initialize calls together. Skinning one of them without the others reads as
a bug.

Scale is a slider per window, 0.5 to 1.5, applied as a multiplier on the
existing scale rather than an absolute -- the three don't ship at the same
size (the vanity store's frame runs about 9% larger than the others), and
that is the server's choice to keep. A setting of 1.0 leaves everything
exactly as it was.

The scale is set on Collections, not on the window itself. All three
windows and the tab row are its children, and it is the only one of them
with mouse enabled -- it is what the player drags. Scaling a window
directly left the drag target at full size, so a shrunk window had to be
grabbed by clicking outside itself, and the tab row, not being a child of
any window, kept whichever size the first-opened one gave it. Scaling the
container moves its hit area with it and the tabs follow as children.
2026-08-17 22:37:53 +02:00
Narcasung 083cbcbf9c Group frame skins under their own settings tab
The CoA options were a flat row of tabs, one per feature, which doesn't
survive the number of frame skins now landing. Skins get their own tab,
first in the row, laid out as a vertical tree so each skinned frame is one
entry rather than one more horizontal tab. Extra Action Button and Instance
Swap move under it.

Each skin also gets a master enable toggle. Skinning is one-way -- the
native art is stripped and replaced in place -- so turning one off can only
take effect on the next load, hence the reload prompt and the gate in
CoA:Initialize rather than an attempt to undo the skin live. Existing users
see no change: both default to on.

LayerPicker's UIDropDownMenu_AddButton wrapper is hooked at file scope,
outside that gate, so it checks the toggle itself. That one does respect
the switch immediately.
2026-08-17 22:19:39 +02:00
Narcasung dc263a2419 Skin the CoA Wardrobe tab (AppearanceWardrobeFrame)
Outer panel, close button, and the top-left portrait medallion get the
same first-pass treatment as Vanity/Talent, plus the item collection
panel: native background/border art stripped from Collection and its
InsetOverlay/ShadowOverlay decoration, the 3D model preview's vanilla
border removed, and the action buttons, search box, Filter/Order By
dropdowns, page arrows, and category tabs skinned to match.

Left native for a later pass: the icon grid contents, item slot
buttons, and character model itself.
2026-08-17 21:54:30 +02:00
Narcasung b14753491c Skin the CoA Vanity tab (StoreCollectionFrame)
Skins the outer window, close button, search box, Filter dropdown
(and its arrow and popup panel), Purchase/Deliver buttons, and the
grid pager arrows. Removes nothing else -- the portrait originally
suspected at the top-left corner turned out not to exist as a
separate element, and the card grid/preview panel are left native.
2026-08-17 20:17:25 +02:00
Narcasung 2736cc0065 Give each character its own settings profile
AceDB:New was passed true as defaultProfile, which the library resolves to the
literal profile name "Default", so profile selection fell back to a single
shared profile for every character instead of to the character key. Changing a
setting on one character changed it everywhere.

Dropping the argument restores AceDB's per-character fallback. Characters
already sitting on the shared profile are moved to their own on next login,
with the shared settings copied across so nothing is lost.
2026-08-17 17:20:26 +02:00
Narcasung 0b9b0c5afa Skin the CoA talent frame's Character Advancement tab
Flattens the custom talent window into the ElvUI look: frame chrome, close
buttons, tabs, bottom bar, dropdowns and their popups, the list scrollbars,
and the spec choice cards' action buttons. The talent tree itself is left
alone -- its node borders encode rank and availability.

Most of the work is in keeping the skin applied. The frames restore their
native art on refresh in three different ways, and none of them fire an
event to hook:

- The scroll arrows re-show a region StripTextures had hidden, so the arrow
  buttons re-hide it from their own update, matching by file so ElvUI's
  panel pieces (which are regions of the same button on this client) survive.
- The pooled menu rows put their hover and selection art back when a scroll
  refills them, without firing OnShow, so the strip runs from the row update
  behind a cheap texture compare.
- The talent frame's close button keeps its absolute frame level while
  TreeView rides along when the frame is raised, so the level bump re-applies
  on every show.

Row fills and the selection edge are textures on the row rather than an ElvUI
backdrop: the backdrop is a child frame and covered the row's icon and text at
every frame level available to it.
2026-08-17 17:15:29 +02:00
Narcasung 015891449e Group CoA anchors under a dedicated CoA category in Toggle Anchors
Registers a COA entry into ElvUI's config-mode dropdown (General/ActionBars/etc.) and tags the Class Resources, Extra Action Bar, and Instance Swap movers with it, so they no longer surface mixed into ElvUI's General/ActionBars anchor filters.
2026-07-19 01:41:04 +02:00
Narcasung fd2ee1903c Defer AceDB initialization until ADDON_LOADED to fix settings not persisting
CoA.db was created at file-load time, racing ahead of this client's
SavedVariables restoration and silently orphaning the profile table
from the real global before it ever got populated from disk.
2026-07-16 16:26:18 +02:00
Narcasung bf9972e624 Fix tooltip drag hint, force-show crash, and Class Resources tab layout
Replace the "Drag to move" tooltip hint on class resource frames instead
of removing it wholesale, so text sharing the same line (e.g. "Right-click
for options") survives; match by substring rather than exact text and scope
by IsMouseOver since GameTooltip's owner can be a child region.

Guard against force-showing a class resource frame the game has never
naturally displayed: its underlying data (powerType, maxValue, ...) is
never populated for a class that doesn't use it, and forcing Show() on it
renders as a garbage white bar texture. Same fix as HideCoAUI's
seenNaturalShow guard.

Rename the Class Resources tab's checkboxes to the frames' actual global
names, stack them vertically, and add Hide All / Show All buttons below them.
2026-07-16 15:46:55 +02:00
Narcasung 97c4defa51 Add Class Resources and Debuff Highlighting modules; migrate settings to AceDB profiles
Move CoA settings from E.global/E.private into a proper AceDB-3.0 database
(CoA.db, SavedVariables ElvUI_CoADB) with a Profiles options tab, since
ElvUI doesn't ship AceDBOptions-3.0 (vendored under Libraries/).

Add ClassResources.lua: hooks the custom-class resource frames (segment
bar, orb, bar, multi-cast bar) into ElvUI's Toggle Anchors, with a
per-frame hide checkbox in a new "Class Resources" options tab.

Add DispelHighlight.lua: highlights dispellable debuffs on unitframes,
with talent-aware filtering for custom classes.

Fix mover/anchor reliability for Class Resources and the Instance
(LayerPicker) button:
- Movers were only retried until the target frame existed, not until the
  mover was actually created, so frames that start at zero size (e.g. a
  resource bar before that resource is ever active) permanently lost
  their mover.
- Class resource frames re-anchor themselves on refresh, stomping the
  mover's anchor; hook SetPoint to snap back to the mover holder whenever
  something else repositions the frame.
- Native click-drag on these frames ends with the engine calling SetPoint
  directly, severing the mover anchor entirely. Permanently block drag
  (script and RegisterForDrag) instead of clearing it once.
2026-07-16 15:24:12 +02:00
Narcasung d769cebbbe Add Instance button font options and increase padding; store CoA settings account-wide via E.global 2026-07-13 18:27:51 +02:00
Narcasung d5b67920a6 Add Extra Action Button keybind with hotkey text, resizable size slider, and recentered anchor 2026-07-13 18:11:07 +02:00
Narcasung db6c7d79b0 Make skinning baseline behavior, restructure options into empty tabs
Skinning of both the ExtraActionBar and LayerPickerFrame buttons is no longer opt-in. Replaces the old single Skins tab and its toggles with two empty tabs, Extra Action Button and Instance Swap, for future per-frame settings.
2026-07-13 15:43:18 +02:00
Narcasung 619c913d1e Add LayerPickerFrame skinning with Instance toggle
Strips the native tooltip-style backdrop pieces off the LayerPickerFrame button and applies the ElvUI backdrop/button style, gated by a new Instance checkbox in the Skins tab.
2026-07-13 15:22:39 +02:00
Narcasung 8beb36e57e Initial commit: ElvUI_CoA plugin
Skins/hides custom CoA-server frames not covered by stock ElvUI, starting with the ExtraActionBar.
2026-07-13 15:03:05 +02:00