Commit Graph
711 Commits
Author SHA1 Message Date
Brues 6a5620c39c Show the built-in config pages as lists of settings in a tree
The built-in pages moved to gui_pages.lua as build functions that add
settings (p:Checkbox, p:Dropdown and so on) instead of making frames.
All of them share one ScrollBox list, which keeps rows from the row
templates only for the settings in view. Each page keeps its scroll
position.

A tree replaces the two columns of tabs: a category opens its first
page and shows its pages, and the other categories close. Pages have
ids, and pfUI.gui:OpenPage(id) opens one. Unlock mode opens a frame's
page by its id. Its "Group Frames" links had opened nothing and the
stance bar link the wrong page; the castbars now open their own pages.

Plugin pages from CreateGUIEntry stay frame pages. Their populate runs
on the first show with `this` as the content, and CreateConfig stacks
its rows there as before. The About page is a frame page too, and reads
its values when it shows instead of every second.

Search goes through the settings of the list pages without building
them, and through the rows of the frame pages, which it builds on the
first search. A result opens its page and marks its row. Focusing the
search box no longer opens an empty result page.

A change refreshes the other rows in view, so the uneven orientation
dropdown follows a new bar layout without keeping a reference to its
row.
2026-11-15 00:49:27 -06:00
Brues 2eb3e6efbe Build the config rows from templates
Each kind of config row is now an XML template in gui_rows.xml with a
mixin in gui_rows.lua. row:Init(setting) binds a setting (its table,
key, values and updater), and the widgets read that setting when an
event comes instead of keeping it in closures. A row can then show
another setting, which the ScrollBox pages need next.

CreateConfig keeps its signature and its line layout, and makes its
rows from these templates. The rows keep the fields that plugins use
(caption, input, color, button, add, del, category, config), so
thirdparty pages work as before. A row now spans the page from its left
edge to its right edge instead of taking a fixed width.

pfUIScrollFrameTemplate's content spanned the frame only until the
first scroll: setting an offset clears the scroll child's anchors and
anchors its TOPLEFT alone, which left the content 1 pixel wide. It now
takes the frame's width from OnSizeChanged.

CVAR, GVAR and UVAR rows read and write through small store tables
instead of copies taken when the row was made. A CVAR row now runs the
updater it is given, and it no longer shows the reload marker: it never
needed a reload.
2026-11-15 00:27:01 -06:00
FayzandBrues 54d795c428 Add CombatLedger dock support to the bottom right panel (#80)
* Add CombatLedger dock integration

Dock CombatLedger into the bottom right panel like ShaguDPS, GreedMeter
and DPSMate. The main window takes the damage slot and the first extra
window takes the threat slot. Adds a CombatLedger (Dock) checkbox under
Thirdparty > Integrations.

* CombatLedger dock: refit header buttons after docking

CombatLedger sizes its Mode/Segment buttons from the window width and only
refits them on a resize drag or appearance change. Fire its appearance hook
after each dock layout so the header fits the half-width window.

* CombatLedger dock review: stable second window, respect panel state

- Dock the lowest-numbered extra window into the threat slot and keep it
  until it closes, instead of taking the first entry of a pairs() walk
  that could change on every call.
- Keep docked windows hidden while the panel is collapsed, even when
  CombatLedger shows them itself (auto-show on combat, group changes,
  /cl show). Showing the panel respects each window's auto-hide and
  grouped-only rules.
- Only touch the second window when the threat slot is ours, for
  CombatLedger and GreedMeter.
- Lock docked windows: no drag or resize grip, so the panel geometry
  is never saved as their floating layout.
- Refit the header once per frame, and only when a docked width changed,
  instead of restyling and redrawing every window several times.
- Disable CombatLedger's own pfUI dock, which shares the config key and
  turned this dock on by itself.
- Share the anchoring and threat-slot code (meters:Place,
  meters:SetSecondary) with GreedMeter; use HookAddon and
  hooksecurefunc instead of the compat hook and hand-written wrappers.

---------

Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>
2026-11-12 11:19:07 -06:00
Brues 3c255ec05f localization review: reuse Blizzard global strings, fix BG score anchors
- Replace 42 pfUI keys whose English text matches a stock 1.12.1 or
  ClassicAPI global (YES, NO, NONE, SEARCH, TARGET, MINIMAP_LABEL, ...)
  with the global; they come translated by the client in every locale.
  Same for UNKNOWN, FACTION_ALLIANCE/HORDE and the ADDON_MEM_* /
  TOTAL_MEM_* formats. Drop those keys from all 8 locale files.
- Rename the tooltip position key "Dodge" to "Above Right Chat" and fix
  the esES/frFR/ruRU values that translated it literally.
- bgscore: clear the frame and mover anchors before applying the saved
  position, drop the unused pfUI.unlock.frames registration, and
  localize the "position saved" message.

All 8 locale files hold the same 1076 keys the code uses.
2026-11-12 10:47:38 -06:00
shikulja 4c32a0e78e ruRU: complete Russian translation and update translation keys
- Translate all 385 remaining ruRU keys; no nil values are left.
- Harmonize 128 existing strings and unify terminology (окна юнита,
  панель здоровья, подсказка, панель применения, восстановление).
- Fix the swapped blacklist/whitelist labels and drop stray quotes.
- Remove the ClassicAPI (UnitInRange) key.
- Add Up/Down keys for Raid Marker Grow and Layout Uneven Orientation
  (ruRU: «Вверх» / «Вниз»; the other locales get the same keys as nil).
- All eight locales keep the same 1,138-key set.
2026-11-12 10:29:27 -06:00
shikulja 8e044135d4 hide not need keys 2026-11-12 10:29:06 -06:00
shikulja 239bd77799 env: complete localization and sync translation keys with code
Finish the localization pass on pfUI: every key the addon uses as T["..."] is
now present in all translations_*.lua files, keys that are no longer used,
along with duplicates, have been removed, and strings that were still hardcoded
in the UI are wrapped in T[...] and added to the key list.

Summary:
* added 178 keys that were missing from enUS (and therefore from every locale);
  values are nil — structure only, no translations;
* localized 59 previously hardcoded strings (raid marker settings, language
  dropdown, dropdown labels, chat messages, innervate announcements, battleground
  mover, distance/rate/memory formats, all Easter eggs and the first-run profile
  buttons); Unknown and Legacy reuse existing keys;
* removed 46 dead keys (45 in enUS/deDE + 1 in zhCN only) — none of them is
  referenced anywhere in the code;
* removed 6 duplicates in enUS and deDE; deDE translations from the duplicate
  lines were moved to the main key lines, so nothing was lost;
* result: 1146 unique keys in each of the 8 files — exactly the number of keys
  used by the code (1599 T["..."] lookups, all literal).

Stats: +2117 key lines, -307 lines (295 dead + 12 duplicates); translated
string count 3889 -> 3774 (the decrease comes only from translations of the
removed dead keys); T["..."] lookups in code 1525 -> 1599 (+74), distinct keys
1087 -> 1146 (+59).

Behavior is unchanged: only labels are translated. Dropdown values keep their
identifiers ("1:...", "0:..."), profile buttons still call
LoadProfile("Modern"/"Nostalgia"/"Legacy"/"Slim"), and the FPS dropdown
suffixes are now one format key, `(%d FPS)`.

Verified:
* parity 1146/1146 in all 8 files: 0 missing, 0 extra, 0 duplicates;
* 0 T["..."] keys without an enUS entry; there are no dynamic T[var] lookups
  in the code (1599 of 1599 lookups are literals);
* relative order of the existing keys is unchanged (lost = 0, reordered = 0);
* no live translation was changed or lost; the translation-file diff is
  additive only (exactly 59 inserted lines per file, 0 modified lines);
* UTF-8 without BOM, CRLF, files end with "}";
* edited Lua files pass a string/comment-aware bracket-balance check
  (no Lua interpreter was available for a full parse);
* the remaining unwrapped literals are symbols and identifiers only
  (`+`, `-`, `?`, `X:`, `Y:`, color codes, frame/skin names).

<details>
<summary>Per-file stats</summary>

| File | Keys now | Lines now | Key lines added | Dead removed | Duplicates removed | Translated strings before -> after |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
| `translations_enUS.lua` | 1146 | 1150 | 237 | 45 | 6 | 0 -> 0 |
| `translations_deDE.lua` | 1146 | 1150 | 270 | 45 | 6 | 26 -> 20 |
| `translations_esES.lua` | 1146 | 1148 | 280 | 34 | 0 | 750 -> 733 |
| `translations_frFR.lua` | 1146 | 1148 | 210 | 34 | 0 | 765 -> 748 |
| `translations_koKR.lua` | 1146 | 1148 | 280 | 34 | 0 | 272 -> 268 |
| `translations_ruRU.lua` | 1146 | 1148 | 280 | 34 | 0 | 781 -> 752 |
| `translations_zhCN.lua` | 1146 | 1148 | 280 | 35 | 0 | 849 -> 816 |
| `translations_zhTW.lua` | 1146 | 1148 | 280 | 34 | 0 | 446 -> 437 |
| **Total** | 1146 each | 9188 | **2117** | **295** | **12** | **3889 -> 3774** |

The differing number of additions per locale is because `deDE` already had 11
of the keys from the throttling section and `frFR` already had 27 of the 178,
and because `deDE`/`zhCN` carried one or more locale-only entries.

</details>

<details>
<summary>Newly localized strings (59 keys)</summary>

| Module | Count | Keys |
| --- | ---: | --- |
| `modules/gui.lua` — Raid Marker section | 17 | `Mark Tracking`, `Raid Marker Width`, `Raid Marker Height`, `Raid Marker Grow`, `Raid Marker Texture`, `Raid Marker Font Size`, `Show Name`, `Show Percent HP`, `Show Portrait`, `Star Color`, `Circle Color`, `Diamond Color`, `Triangle Color`, `Moon Color`, `Square Color`, `Cross Color`, `Skull Color` |
| `modules/gui.lua` — dropdown labels | 14 | `English`, `Spanish`, `French`, `Korean`, `Russian`, `Chinese (Simplified)`, `Chinese (Traditional)`, `Original Blizzard`, `pfUI Design`, `Separate Bar`, `Overlay`, `Auto`, `Row-first (1,2,3 / 4,5,6)`, `Column-first (1,3,5 / 2,4,6)` |
| `modules/gui.lua` — messages, FPS suffix | 3 | `Please enable the Hoverbind module to use this feature.`, `Please enable the Share module to use your config.`, `(%d FPS)` |
| `modules/firstrun.lua` | 4 | `Couldn't apply settings. Chat module is disabled.`, `Modern`, `Nostalgia`, `Slim` (`Legacy` reuses an existing key) |
| `modules/easteregg.lua` | 10 | `\|cff33ffccShagu\|cffffffff wishes you a`, `\|cff444444<Click> or '/afk' to exit`, `happy valentine's day!`, `happy hallow's end!`, `merry christmas!`, `happy new year!`, `Another year with \|cff33ffccpf\|rUI has passed.\nThanks for continuing to use it!`, `You are now \|cff33ffcc%s\|r (AFK).`, `You are now \|cff33ffcc%s\|r (AFK): %s`, `You are no longer \|cff33ffcc%s\|r (AFK).\n…merry christmas…` |
| `modules/innervatecall.lua` | 2 | `>> Innervate is ready <<`, `>> Innervate cast on %s <<` (`Unknown` reuses an existing key) |
| `modules/bgscore.lua` | 2 | `\|cff3399ffAlliance: 123\|r  \|  \|cffff4444Horde: 456\|r`, `BG Score` |
| `modules/radar.lua`, `modules/xpbar.lua`, `modules/panel.lua` | 6 | `%.1f yd`, `/ min`, `(%.0f KB) %s`, `(%.2f MB) %s`, `AddOn Memory: %.0f KB`, `AddOn Memory: %.2f MB` |
| `api/ui-widgets.lua` | 1 | `Are you sure?` |

Notes:
* `(%d FPS)` replaces 12 hardcoded suffixes (`" (2 FPS)"` … `" (50 FPS)"`) in the
  two throttling dropdowns.
* The `X:` / `Y:` axis labels in `modules/unlock.lua` were deliberately left
  alone (universal axis notation).
* `RESTORE_SET_NAME = "pfUI Auto-Restore"` in `modules/equipmentmanager.lua` is a
  persisted comparison identifier and is not translatable.
* The ClassicAPI dependency-gate messages in `API_Check.lua` are not localized:
  that file runs before the pfUI environment exists, so `T` is not available.
* GM menu, debug/diagnostics output (`superwow.lua`, `unitxp.lua`), addon proper
  names, CVars, format strings and skin/frame identifiers stay untranslated.

</details>

<details>
<summary>Added keys — modules/gui.lua (101)</summary>

| # | Key |
| ---: | --- |
| 1 | `1 Decimal (2.1)` |
| 2 | `2 Decimals (2.14)` |
| 3 | `Abbreviate 1 Decimal (4.2k)` |
| 4 | `Abbreviate 2 Decimals (4.25k)` |
| 5 | `Abbreviate Numbers` |
| 6 | `Always Show Equipment Slot Flyouts` |
| 7 | `Announce Automatic Set Switches In Chat` |
| 8 | `Auto Sort When Opening Bags` |
| 9 | `Automatic Set Switching` * |
| 10 | `Castbar Timer Decimals` |
| 11 | `Character` |
| 12 | `ClassicAPI (UnitInRange)` |
| 13 | `Disable Friendly Nameplates In Friendly Zones` |
| 14 | `Disable Hostile Nameplates In Friendly Zones` |
| 15 | `Display Raid Group Label` |
| 16 | `Druid Mana Bar Spacing` |
| 17 | `Druid Mana Bar Texture` |
| 18 | `Druid Mana Bar Width (-1 = auto)` |
| 19 | `Druid Mana Bar X-Offset` |
| 20 | `Druid Mana Bar Y-Offset` |
| 21 | `Druid Settings` |
| 22 | `Enable Automatic Set Switching` * |
| 23 | `Enable OS Notifications` |
| 24 | `Enable Player Levels` |
| 25 | `Energy/Mana Ticks` |
| 26 | `Equipment Manager` |
| 27 | `Fill Order` |
| 28 | `Five Second Rule Color` |
| 29 | `Five Second Rule Height` |
| 30 | `Five Second Rule Style` |
| 31 | `Full Numbers (4250)` |
| 32 | `Group Label X-Offset` |
| 33 | `Group Label Y-Offset` |
| 34 | `Hide yd characters` |
| 35 | `Hook Distance to Portrait Frame` |
| 36 | `Include Bank Items` |
| 37 | `Inventory` |
| 38 | `Items` |
| 39 | `Items Not In Any Set` * |
| 40 | `Layout Uneven Orientation` |
| 41 | `Mainhand Bar Color` |
| 42 | `Merge Tradeskill Casts` |
| 43 | `Minimap Player Arrow Scale` |
| 44 | `Minimum Item Quality` |
| 45 | `Name Text Position` |
| 46 | `Nampower Settings` |
| 47 | `Note: Only works when Cursor Align is NOT 'Native'` |
| 48 | `Offhand Bar Color` |
| 49 | `Only Show Your Debuffs` |
| 50 | `Pixel Perfect UI-Scale: %s (Overrides UI-Scale)` |
| 51 | `PvP Flag Position` |
| 52 | `PVP Flag Size` |
| 53 | `PvP Flag X-Offset` |
| 54 | `PvP Flag Y-Offset` |
| 55 | `Raid Mark Icon Style` |
| 56 | `Range Check Mode` |
| 57 | `Ranged Bar Color` |
| 58 | `Ranged Warn Color (Hunter)` |
| 59 | `Reactive Indicator Size` |
| 60 | `Reverse Sort Direction (Last Bag First)` |
| 61 | `Reverse Sort Priority (Hearthstone Last)` |
| 62 | `Show Attack Speed` |
| 63 | `Show Aura Caster` |
| 64 | `Show Behind Indicator` |
| 65 | `Show Debuffs on Friendly` |
| 66 | `Show Debuffs on Hostile` |
| 67 | `Show Distance of Target` |
| 68 | `Show Durability` |
| 69 | `Show Faction Icons` |
| 70 | `Show Five Second Rule` |
| 71 | `Show Line of Sight Indicator` |
| 72 | `Show MH/OH Labels` |
| 73 | `Show Movement Speed` |
| 74 | `Show Offhand Bar` |
| 75 | `Show On Next Attack Queue Color` |
| 76 | `Show Only Own Debuffs` |
| 77 | `Show Race Icons` |
| 78 | `Show Ranged Bar` |
| 79 | `Show Reactive Spell Indicator` |
| 80 | `Show Reputation Remaining` |
| 81 | `Show Spell IDs` |
| 82 | `Show Spell Queue Indicator` |
| 83 | `Show Timestamps In Chat Copy` |
| 84 | `Show Unit Buffs` |
| 85 | `Show Unit IDs` |
| 86 | `Spell Queue Icon Size` |
| 87 | `Spells` |
| 88 | `Swing Timer` |
| 89 | `Swing Timer Font Size` |
| 90 | `Swing Timer Height` |
| 91 | `Swing Timer Texture` |
| 92 | `Swing Timer Width` |
| 93 | `Target Indicator Font Size` |
| 94 | `Target Indicators` |
| 95 | `Track Group on Minimap` |
| 96 | `Uninterruptible Color` |
| 97 | `Units` |
| 98 | `UnitXP (Precise)` |
| 99 | `UnitXP Range Threshold (yards)` |
| 100 | `UnitXP Settings` |
| 101 | `Use UI-Scale` |

\* also used in `modules/equipmentmanager.lua`.

</details>

<details>
<summary>Added keys — modules/equipmentmanager.lua (66)</summary>

| # | Key |
| ---: | --- |
| 1 | `%d items, %d ignored` |
| 2 | `Add the current zone` |
| 3 | `Any Form` |
| 4 | `Aquatic Form` |
| 5 | `Automatic Set Switching` * |
| 6 | `Battle Stance` |
| 7 | `Battleground` |
| 8 | `Bear Form` |
| 9 | `Berserker Stance` |
| 10 | `Cat Form` |
| 11 | `Condition met, but a trigger higher in the list wins` |
| 12 | `Create an equipment set first.` |
| 13 | `Currently active` |
| 14 | `Defensive Stance` |
| 15 | `Do Nothing` |
| 16 | `Dungeon` |
| 17 | `Eating / Drinking` |
| 18 | `Enable Automatic Set Switching` * |
| 19 | `Equip` |
| 20 | `Equip sets automatically when mounted, swimming, eating, in a zone, at a given time and more.` |
| 21 | `Equippable items in your bags, bank and paperdoll that no equipment set uses.` |
| 22 | `Equipping %s` |
| 23 | `Equipping %s (%s)` |
| 24 | `Every equippable item is part of a set.` |
| 25 | `Ghost Wolf` |
| 26 | `Here` |
| 27 | `Ignored (Right-Click to unignore)` |
| 28 | `In Bags` |
| 29 | `In Bank` |
| 30 | `Instance Type` |
| 31 | `Items Not In Any Set` * |
| 32 | `Local time window, e.g. 20:00-23:00` |
| 33 | `Moonkin Form` |
| 34 | `Mounted` |
| 35 | `New Trigger` |
| 36 | `No Form (Caster)` |
| 37 | `No set selected` |
| 38 | `No triggers yet. Click "New Trigger" to add one.` |
| 39 | `Not part of any equipment set` |
| 40 | `Open World` |
| 41 | `Resting (Inn / City)` |
| 42 | `Restore Previous Gear` |
| 43 | `Restoring previous gear` |
| 44 | `Select a trigger to edit it.` |
| 45 | `Selected Trigger` |
| 46 | `Separate several zones with ;` |
| 47 | `Shadowform` |
| 48 | `Shapeshift Form / Stance` |
| 49 | `Shift-Click: Link  Ctrl-Click: Preview\nRight-Click: Ignore / Unignore` |
| 50 | `Show Ignored` |
| 51 | `Stealth` |
| 52 | `Stealthed` |
| 53 | `Swimming` |
| 54 | `Targeting A Boss` |
| 55 | `Time Of Day` |
| 56 | `Travel Form` |
| 57 | `Tree of Life Form` |
| 58 | `Triggers` |
| 59 | `Triggers higher in the list take priority. Gear is never swapped in combat, while dead or while casting: the switch waits until it can happen.` |
| 60 | `Unused` |
| 61 | `Value` |
| 62 | `When` |
| 63 | `When It Ends` |
| 64 | `Windows may wrap past midnight (22:00-02:00).` |
| 65 | `Zone` |
| 66 | `Zone or subzone name` |

\* also used in `modules/gui.lua`.

</details>

<details>
<summary>Added keys — other modules (14)</summary>

| Module | Key |
| --- | --- |
| `modules/radar.lua` | `Above you` |
| `modules/radar.lua` | `Below you` |
| `modules/radar.lua` | `Out of line of sight` |
| `modules/radar.lua` | `Radar` |
| `modules/tooltip.lua` | `Cast by` |
| `modules/tooltip.lua` | `Speed` |
| `modules/tooltip.lua` | `SpellID` |
| `modules/tooltip.lua` | `UnitID` |
| `modules/hoverbind.lua` | `is currently overridden by` |
| `modules/hoverbind.lua` | `was unbound from` |
| `modules/xpbar.lua` | `Rested Gain` |
| `modules/xpbar.lua` | `Time to Rested Cap` |
| `api.lua` | `The UI-Scale has changed. Reload the UI to redraw the borders?` |
| `modules/firstrun.lua` | `Cancel` |

</details>

<details>
<summary>Removed dead keys (46)</summary>

| Key | Category | Was present in |
| --- | --- | --- |
| `Heal Prediction Cleanup` | dead, throttling-section leftover | enUS, deDE |
| `Health/Status Bar` | dead, throttling-section leftover | enUS, deDE |
| `Libpredict` | dead, throttling-section leftover | enUS, deDE |
| `Mass` | dead, throttling-section leftover | enUS, deDE |
| `Panel Alignment` | dead, throttling-section leftover | enUS, deDE |
| `Panel Alignment Check` | dead, throttling-section leftover | enUS, deDE |
| `Player Frame` | dead, throttling-section leftover | enUS, deDE |
| `Raid/Party Frames` | dead, throttling-section leftover | enUS, deDE |
| `Target/Casting` | dead, throttling-section leftover | enUS, deDE |
| `Target/Casting Plates` | dead, throttling-section leftover | enUS, deDE |
| `Unit Frame Update Rate` | dead, throttling-section leftover | enUS, deDE |
| `Abbreviate Numbers (4200 -> 4.2k)` | legacy | all 8 |
| `Border Size` | legacy | all 8 |
| `Close` | legacy | all 8 |
| `Config UI Settings` | legacy | all 8 |
| `Cooldown / Durations` | legacy | all 8 |
| `Cooldown Text Threshold` | legacy | all 8 |
| `Defaults` | legacy | all 8 |
| `Display Debuff Durations` | legacy | all 8 |
| `Do you really want to reset \|cffffaaaaEVERYTHING\|r?` | legacy | all 8 |
| `Druid Mana Bar Text` | legacy | all 8 |
| `Effective Haste (Haste * cast time reduction)` | legacy | all 8 |
| `Enable Pixel Perfect Borders` | legacy | all 8 |
| `Enable UI-Scale` | legacy | all 8 |
| `Estimate Debuffs` | legacy | all 8 |
| `Focus Castbar` | legacy | all 8 |
| `Haste (cast speed increase)` | legacy | all 8 |
| `Huge (PixelPerfect)` | legacy | all 8 |
| `Load Defaults` | legacy | all 8 |
| `Look & Feel` | legacy | all 8 |
| `Menu Font` | legacy | all 8 |
| `Menu Font Size` | legacy | all 8 |
| `Off` | legacy | all 8 |
| `Only` | legacy | all 8 |
| `Only Show Own Debuffs (\|cffffaaaaExperimental\|r)` | legacy | all 8 |
| `Player Castbar` | legacy | all 8 |
| `Regional Settings` | legacy | all 8 |
| `Save & Reload` | legacy | all 8 |
| `Scale Border On HiDPI Displays` | legacy | all 8 |
| `Show Incompatible Config Entries` | legacy | all 8 |
| `Soul Shard` | legacy | all 8 |
| `Soulshards` | legacy | all 8 |
| `Target Castbar` | legacy | all 8 |
| `Tiny (PixelPerfect)` | legacy | all 8 |
| `Use Blizzard Borders` | legacy | all 8 |
| `Show Player Levels` | stale, zhCN only | zhCN |

</details>

<details>
<summary>Removed duplicates (6, in enUS and deDE)</summary>

| Key | What was done |
| --- | --- |
| `Fast` | kept the first occurrence; in deDE the "Schnell" value was moved from the duplicate into the main key line |
| `Nameplates` | kept the first occurrence; in deDE "Namensplaketten" was moved into the main key line |
| `Normal` | kept the first occurrence (inside the throttling block); both deDE values were identical |
| `Slow` | kept the first occurrence; in deDE "Langsam" was moved into the main key line |
| `Very Fast` | kept the first occurrence; in deDE "Sehr Schnell" was moved into the main key line |
| `Very Slow` | kept the first occurrence; in deDE "Sehr Langsam" was moved into the main key line |

</details>
2026-11-12 10:28:21 -06:00
Brues 02cf6b5d5b Fonts: only offer Noto Sans SC when Fonts\FZLBJW.TTF loads
Some Turtle WoW installs ship Noto Sans SC as FRIZQT__.TTF instead of
FZLBJW.TTF, so picking the entry set a font the client can't load and
every SetText errored. Probe the file with SetFont, which returns nil
for a missing font, instead of gating on TURTLE_WOW_VERSION.

Refs #79
2026-11-12 10:23:00 -06:00
Brues f23f694570 bags: sort with C_Container.SortBags/SortBankBags, drop libbagsort and its reverse options 2026-11-12 10:18:11 -06:00
Brues f25e3adac6 remove libthrottle: tooltip cursor follow runs every frame, Throttling menu and pfUI_throttle gone 2026-11-12 10:14:56 -06:00
Brues b068ec83c2 chat: drop the tab hover-check throttle and its Throttling > Chat Tab settings 2026-11-12 10:12:26 -06:00
Brues 560343bd74 Fonts: offer Turtle's FZLBJW.TTF (Noto Sans SC) to every client for CJK text
Turtle WoW ships Noto Sans SC as Fonts\FZLBJW.TTF in patch-5.mpq to all
clients, so enUS players can pick a font that renders Chinese names and chat.
Fixes #79
2026-11-04 12:41:25 -06:00
Brues df7c13651b Action bars: glow proc and reactive spells from ClassicAPI's overlay events
A button on the action bars pulses a gold border while the spell in its
slot glows: Overpower, Revenge, Execute, Riposte, Counterattack, Mongoose
Bite and Hammer of Wrath while usable, and Shadow Bolt under Shadow
Trance. The slot update resolves the spell, through GetMacroSpell for a
macro, and reads IsSpellOverlayed, so glows lit before a /reload show.
SPELL_ACTIVATION_OVERLAY_GLOW_SHOW/HIDE then update the buttons with that
spell ID; every rank fires its own event.

"Highlight Proc And Reactive Spells" under Action Bars turns it off.
The screen alerts are left out: their art isn't in the 1.12 client.
2026-11-03 01:07:03 -06:00
Brues 14ae659f2a Swing timer: bars fill from duration objects, drop the OnUpdate
Each bar fills itself from a duration object of the swing, a text
binding counts it down, and the marker with its glows rides the fill's
edge. One C_Timer per bar ends the swing, runs the melee grace and
switches a hunter's reload to the deadzone. Colors update on the events
that change them, ACTIONBAR_UPDATE_STATE standing in for the per-tick
IsCurrentAction reconcile; a bar waiting past its grace hides on
STOP_AUTOATTACK or leaving combat. The three bar builders become one.

The Swing Timer throttle setting only paced the OnUpdate, so it goes.
2026-11-03 01:07:02 -06:00
Brues a376afb2d7 UI scale: size borders from the scale the game applies, mirror its options
GetPerfectPixel divided by the uiScale option, or by 1 while useUiScale was
off, though the game's automatic scale is never under 0.9, so default
borders came out about a tenth of a pixel thin. The game scales UIParent
only after add-ons and saved variables load, so the pixel now comes from
GetPhysicalScreenSize and the scale the game is about to apply, worked out
from the same options and rules as OnDisplaySizeChanged. UI_SCALE_CHANGED
offers a reload once when the pixel size changes.

The preset dropdown and the pixelperfect module go: its presets were pixel
perfect only at 1080p and its restore path never ran. The settings show the
game's own Use UI-Scale and UI-Scale options, plus a Pixel Perfect UI-Scale
checkbox (one UI unit per screen pixel, kept through window resizes) that
overrides them. The pixel perfect border and HiDPI options go too; border
sizes now count real pixels. CVAR settings rows write their option through
their own config instead of this:GetParent(), which a dropdown's menu
button is not. The first-run slider stops at 0.64, below which the game
drops uiScale for its automatic scale.
2026-11-03 01:07:02 -06:00
Brues c8cc7bde79 Frame sizes: measure anchor-sized regions with the unscaled getters
GetWidth/GetHeight return an anchor-sized region's size times its effective
scale, so at any UI scale but 1 they disagreed with the sizes and offsets
built from them. The craft spark, raid-marker name shortening, unit frame
indicators, dropdown widening and the cooldown font's first size now read
GetUnscaledWidth/GetUnscaledHeight. The combat log and the settings rows
drop their GetRight()-GetLeft() workarounds for the same bug.
2026-11-03 01:07:02 -06:00
Brues 2909679d62 Cast bars: fill and count down from duration objects, drop the OnUpdate sweeps
Player/target/focus bars and nameplate castbars hand their fill to
StatusBar:SetTimerDuration and their timer text to a duration text binding.
Pushback re-reads UnitCastingDuration/UnitChannelDuration; a C_Timer clears a
bar whose STOP never arrives. The nameplate castbar throttle is obsolete and
goes with its settings page.
2026-11-03 01:07:02 -06:00
Brues 001e09c1b7 Pick cooldown timers per feature with one dropdown
Each feature's settings page now picks its own timers - None, Numbers,
Sweep, or Numbers And Sweep - in place of the "Show Numbers On", "Show
Sweep On" and "Reverse Sweep On" lists on Settings -> Cooldown. Unit
frames get theirs per frame again ("Buff And Debuff Timers" and
"Indicator Timers"), so party and pet can drop their numbers while the
target keeps them. The other dropdowns sit on Action Bars, Bags & Bank,
Buff/Debuff Icons, Totem Icons, Tooltip and Nameplates.

Settings -> Cooldown keeps the shared font, size, threshold, tenths and
colors, plus the timers of Spellbook And Character, Loss Of Control and
Other Addons, which have no page of their own.

CreateCooldown(parent, kind, config, key, name) reads its mode from
config[key]. The kind says only what it times: "spell" hides numbers on
the global cooldown, "aura" drains its sweep, "timer" fills it. The
reverse option is gone; the direction follows the kind.

The migration carries every old setting into its timers: the
C.cooldown kind tables, appearance.cd's foreign and Blizzard toggles,
the buff frame's sweep, the nameplate debuff options, and each unit
frame's timer text, sweep and "Show Time Left" from before the kinds,
so frames that had their own settings keep them. Reverse options are
dropped.
2026-11-02 16:07:41 -06:00
Brues ebb4b056c3 Nameplates: drive every plate from unit events, drop the per-tick loop
The module polled: a central OnUpdate at 100 Hz over every visible plate,
a full OnDataChanged refresh of each plate every 0.5 s, and per-tick reads
of the engine's name/level regions, frame size, mouse state and
SpellIsTargeting. ClassicAPI feeds every unit event to the nameplateN
tokens, so none of that is needed.

Each bound plate now registers its unit events on its own frame against
its token (UNIT_HEALTH/MAXHEALTH, UNIT_AURA_DELTA, UNIT_FLAGS,
UNIT_DYNAMIC_FLAGS, UNIT_FACTION, UNIT_LEVEL, UNIT_CLASSIFICATION_CHANGED,
UNIT_NAME_UPDATE, UNIT_TARGET, the casts) and each handler updates only
what that event can change; the module-level events (target, combat,
level-up, roster, guild, spell targeting) fan out to the plates they
concern. Health comes from UnitHealth on the token instead of the
engine bar's OnValueChanged hook; name, level and difficulty colour from
UnitName/UnitLevel/GetDifficultyColor instead of the blanked engine
regions (UnitLevel's -1 is exactly the engine's skull case, so "??B"
survives). The engine resets the plate's size at every bind, so the
engine frame's size and click routing are re-applied from its OnShow
instead of being checked every tick; the overlay steps aside for
ground-target spells on CURRENT_SPELL_CAST_CHANGED.

The only OnUpdate left is a driver frame, shown while a castbar sweeps or
the target zoom animates and hidden when both sets are empty; the zoom
is time-based now rather than per-tick multiplication. The
nameplates/nameplates_target/nameplates_mass throttle categories no
longer mean anything and are gone from libthrottle and the GUI;
nameplates_castbar stays as the sweep rate of non-target castbars.

Mouseover tracking is gone (the token already names the unit), and
libhealth's "known" return now decides whether absolute health is shown,
so a unit whose health is only known as a percentage no longer prints
"57 | 57%".
2026-11-01 21:40:50 -06:00
AbyssandBrues e609809fff Raid unitframes: add option to reverse group order (#75)
* Add raidreverse default to unitframes config

Defaults to off, so existing layouts are unchanged.

* Raid frames: add option to reverse group order

Read the new raidreverse setting and mirror the column index when placing raid frames, so group 1 sits on the far right and the following groups grow to the left.

* Add "Reverse Group Order" checkbox to raid settings

Placed under "Raid Fill Direction" in the raid frame options.
/pfui > Settings > Unit Frames > Raid > Layout

* Raid frames: rename reverse option to "Grow Right To Left"

The option mirrors columns in both fill directions, so name it for what
it does. Mirror across the columns maxraid can fill instead of the whole
layout, so smaller raids stay next to the anchor. Lay the raid grid out
through SlotToCoord like the pet grid, move the default next to the other
raid layout keys, and add the label to the locale tables.

---------

Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>
2026-11-01 18:02:31 -06:00
Antoine ChedinandBrues 77be27094a Add Offsets to unit frame buff/debuff (#74)
* Add anchor offset for unitframe buff or defuff

* Fix default values

* Stack a shared-corner aura block past the other block's Y offset, read the offsets without a table per icon

---------

Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>
2026-11-01 16:39:48 -06:00
Brues 907d282a68 Centralize cooldown setup and settings
Every pfUI cooldown is now made by CreateCooldown(parent, kind) in the
new api/cooldown.lua, which replaces the cooldown module. A kind names
what the cooldown times: actionbar, bags, blizzard (spellbook and
character), unitframe, indicator, nameplate, buff, tooltip, totem or
lossofcontrol. The pfCooldownType, pfCooldownStyleText,
pfCooldownStyleAnimation and pfCooldownSize fields are gone. The new
file owns everything the cooldowns share:
- the numbers' font and size
- the formatter
- each kind's numbers, sweep and sweep direction
- the GCD threshold for spell kinds
- the CooldownFrame_SetTimer hook for other addons' Cooldown frames
UpdateCooldowns applies changed settings to every cooldown at once.
GetAuraTimer moves here from the unit frames.

All settings live in one C.cooldown table, on one page: Settings ->
Cooldown. It has the shared font, size, threshold, tenths and colors,
then "Show Numbers On", "Show Sweep On" and "Reverse Sweep On" lists
with a checkbox per kind. The per-module options are removed:
- each unit frame's timer text, animation and reverse, and the
  indicators' "Show Time Left"
- the nameplate debuff timer options
- the Blizzard and foreign font sizes and toggles
- Action Bars' cooldown text size
- the reverse options of bars, bags, buffs and totems
The old appearance.cd settings are not migrated.

The player buff frame and the tooltip aura icons now show the native
countdown too, which replaces their own text and OnUpdate ticking. The
buff frame keeps its inside or below-the-icon placement. Weapon
enchants report only their time left, so they start through
SetCooldownTimeLeft: numbers, no sweep. A slim poll remains for their
charges and renewals, since no event reports those. Buff indicators
now take the aura's real duration, which gives them a correct sweep.
The spellbook and character slots now hide GCD numbers like the other
spell cooldowns.
2026-10-31 19:17:14 -05:00
Brues 93ab07a662 Show cooldown text through ClassicAPI's native countdown
The cooldown module no longer builds its own text frame with a 10 Hz
OnUpdate per cooldown. The CooldownFrame_SetTimer hook now configures
each Cooldown frame's own countdown instead: SetHideCountdownNumbers
for the per-frame text toggles and omnicc's noCooldownCount,
SetMinimumCountdownDuration for the GCD threshold, and
GetCountdownFontString for the pfUI font and size. The engine ticks
the numbers, gated by the countdownForCooldowns cvar. The cvar gets a
checkbox in the Cooldown settings, and pfUI.SetupCVars turns it on.

The text comes from one shared C_StringUtil numeric rule formatter,
given to each frame with SetCountdownFormatter. Its breakpoints keep
pfUI's format: the number in its unit's cooldown color, a unit (m/h/d)
once the unit below passes 99, and tenths in the low color when
milliseconds are on. Values now round up. GetColoredTimeString formats
through the same formatter, so the buff, buffwatch and tooltip timers
match. A config:changed callback rebuilds the breakpoints, and every
frame picks them up on its next update.

The paper-doll slots swap their indicator Models for Cooldown frames,
as the spellbook and bags already do. They and the spellbook take the
BLIZZARD tag when they are created, replacing the per-update hooks in
the skin module. Models get no numbers. Hide Foreign Cooldown
Animations clears the draw flags instead of setting alpha to 0, so the
numbers stay visible. The buff module's sweep hides its numbers
because buff.timer carries the text.
2026-10-31 18:45:17 -05:00
Brues 3b64bfa98b Show the target LoS indicator through ClassicAPI's UnitInLineOfSight
The indicator moves from the unitxp module to the target frame, so it no
longer needs UnitXP_SP3. Its checkbox and the shared font size move to a
Target Indicators header; unitxp_font_size becomes indicator_font_size.
The unused pfUI.api.UnitInLineOfSight wrapper, which shadowed the
ClassicAPI global inside the pfUI environment, is removed.
2026-10-31 15:41:15 -05:00
Brues f81ea09d1c Choose 3D, 2D or round/square class icon portraits 2026-10-31 14:43:43 -05:00
Brues e5a78c8d54 Animate unit frame bars with ClassicAPI's SmoothStatusBarMixin
Health and power bars take SmoothStatusBarMixin instead of pfUI's own OnUpdate animation, so the animation no longer runs faster at higher frame rates. The speed dropdown becomes an on/off checkbox, since the mixin's rate is fixed. A new range keeps the bar's filled share, so it doesn't jump before the animation moves on.
2026-10-31 14:20:20 -05:00
Brues ff5deac0ec Copy links with CopyToClipboard instead of a popup
Clicking a chat URL and the GUI's Donate/GitHub/Website buttons now put the address straight on the clipboard and say so in chat. The url link goes through ClassicAPI's LinkUtil handler registry, so SetItemRef is no longer replaced. Exporting a profile also copies the string.
2026-10-30 23:45:08 -05:00
Brues cff4be9416 Mousewheel Scroll Speed doesn't require a reload to change 2026-10-30 23:40:50 -05:00
Brues 6a670ab668 Tint swing timer bars while the target is out of range
C_SwingTimer checks the range for each shown bar, and
PLAYER_SWING_RANGE_UPDATE turns a bar the new Out Of Range Color (grey by
default, since the main-hand bar and the hunter dead zone are red) while
its swing can't reach the current target. The melee check is the
server's 2D reach; the ranged one covers the hunter's minimum range too.
No check (no target, nothing to attack, no weapon) keeps the normal
color.
2026-10-30 23:31:29 -05:00
Brues f7680ded0b Fill textures with SetColorTexture instead of color-form SetTexture
ClassicAPI's SetColorTexture is the same engine call as SetTexture(r, g, b [, a]) under the name that says what it does. 83 calls across 25 files, renamed only.
2026-10-30 19:48:48 -05:00
Brues 4988384884 Light config rows on mouse motion and list search results in a ScrollBox
Config rows and search results took their hover from an OnUpdate that
polled the cursor every frame. Rows now take OnEnter/OnLeave, and their
widgets propagate mouse motion so the row stays lit over them. Search
results fill a pfUIScrollBoxListTemplate from a DataProvider instead of
a hand-pooled button list, and match the search text literally.
2026-10-30 19:39:22 -05:00
Brues af9edb215d Show pfUI's dropdowns and menus with ClassicAPI's menu system
pfUIDropdownTemplate (a DropdownButton) replaces CreateDropDownButton in
the config GUI, addon profiles, the trigger editor and the icon picker
filter. The equipment set gear menu and the tracking menu open
MenuUtil context menus. pfUIMenuStyleMixin draws pfUI's backdrop behind
them, and the skin module makes it the default style and draws the
checkboxes and radios as pfUI boxes.
2026-10-30 19:33:40 -05:00
Brues b0f9b7b993 Use ClassicAPI's nop for empty functions 2026-10-30 12:20:37 -05:00
Brues 436c6d6dd4 Apply per-line chat settings without a reload 2026-10-30 12:20:23 -05:00
Brues a96a3dbd87 Show the About page's values inside the panel
The values anchored to the content's TOPRIGHT, which now spans the whole
panel since the panels moved to pfUIScrollFrameTemplate, so they sat 375px
past its right edge and the scroll frame clipped them. Anchor them to the
content's TOPLEFT, where the labels' offsets already measure from.
2026-10-30 11:45:08 -05:00
Brues a721f788a9 Let each cooldown frame apply its own sweep settings
The sweep options reached the frames only through the cooldown module's
CooldownFrame_SetTimer hook, which set alpha 0 for a hidden animation and
SetReverse(true) for a reversed one. With that module disabled, Show Timer
Animation and Reverse did nothing, and reverse never turned back off
without a reload. The player buff sweeps had no other path at all.

Each owner now configures its own frame. Player buffs drive their
Cooldown with SetCooldown and Clear, and only while Show Timer Animation
is on. Unit frame auras, raid aura indicators and nameplate debuffs hide
the sweep with SetDrawSwipe and SetDrawBling. Every frame with a reverse
option calls SetReverse. The hook keeps the timer text and Hide Foreign
Cooldown Animations.

Nameplate debuffs hid the sweep with alpha, which the plate's SetAlpha
copied down on every target change (ClassicAPI keeps 1.12's alpha under
default plates), so hidden sweeps came back. Their settings now come from
UpdateDebuffConfig alone.

Bag slots get a native Cooldown like bank slots, in place of the
template's indicator Model, so Reverse Cooldown Animation covers bags and
Hide Foreign Cooldown Animations no longer hides them.

The buff, unit frame, nameplate and totem options apply without a reload.

Fixes #72.
2026-10-30 10:46:00 -05:00
Brues 393b37b8c3 Add an option to show timestamps in chat copy
"Show Timestamps In Chat Copy" (chat text settings, on by default) is read
each time chat copy opens. With it off, chat copy takes each line through
pfUI.chat.StripTimestamp, which removes the exact timestamp AddMessage
prepends: the configured color and brackets, so other bracketed text
stays.

Whispers are now recolored before the timestamp goes on, not after. The
recolor turned the stamp's closing "|r " into "|r" plus the whisper color,
so whisper lines did not match. The shown text and the saved history come
out the same.
2026-10-30 01:25:36 -05:00
Brues 5d8314b2d4 Scroll the config panels with ClassicAPI's scroll bar
pfUIScrollFrameTemplate (api/ui-widgets.xml) is a ScrollFrame with
pfUIScrollBarTemplate inside its right edge and a Content scroll child,
driven by ScrollUtil.InitScrollFrameWithScrollBar. The panels keep a
ScrollFrame because the engine measures its range from the shown frames
inside the content, which the hand-placed config rows rely on. The bar
follows OnScrollRangeChanged instead of an OnUpdate poll per panel.

A panel measures its range once its rows are built, and the search
results measure theirs with UpdateScrollChildRect instead of hiding,
re-attaching and scrolling a frame later. Clearing the search measures
again too.

CreateScrollFrame and CreateScrollChild have no users left, and nothing
called CreateTabFrame or CreateTabChild; all four are gone. pfQuest's
compat layer brings its own copies of the scroll helpers.
2026-10-30 00:51:16 -05:00
Brues 6dcb5162be bags: use ClassicAPI's native item search
C_Container.SetItemSearch drives the search box; slots dim from isFiltered on INVENTORY_SEARCH_UPDATE and on each slot update. Matches name, subclass, equip slot and equipment set names. Drops the tooltip-scanning full-text option.
2026-10-29 10:35:28 -05:00
0cabf2ec29 Add equipment manager auto-switching and "Unused" items panel (#70)
* Add equipment manager auto-switching and "Unused" items panel

Equipment manager (modules/equipmentmanager.lua):
- Add automatic set switching: ordered triggers (mounted, swimming,
  eating/drinking, shapeshift form/stance, zone, instance type, time
  of day, resting, stealthed, targeting a boss) equip a set; topmost
  matching trigger wins, with a 0.5s debounce
- Never swap gear in combat, while dead or casting; optionally restore
  the previous gear via a hidden "pfUI Auto-Restore" set
- Add an "Unused" side panel listing equippable items in bags, bank
  and paperdoll that no set uses, with an ignore list (tools and quest
  disguises pre-ignored), bank snapshot and bag highlighting
- Persist triggers, ignore list and bank snapshot in new per-character
  SavedVariable pfUI_eqmgr (all three .toc files)
- Add Character > Equipment Manager options (autoswitch, announce,
  minimum item quality, include bank) in gui.lua and config.lua
- Hide ignored-slot overlays when the manager frame is closed

Add frFR translations for the new equipment manager strings.

* equipmentmanager: lean on ClassicAPI for unused scan and autoswitch

- Unused panel: list items via GetInventoryItemsForSlot instead of
  hand-packing locations and walking the bags.
- Bank snapshot: record set membership while the bank is open.
  GetItemLocations reports bank items as missing once it closes, so set
  items in the bank were listed as unused.
- Autoswitch: check CanUseEquipmentSets and the UseEquipmentSet result
  before marking a trigger applied, and retry when the swap is blocked.
- Drive the engine from events (aura, form, zone, resting, target,
  regen) instead of a 4 Hz ticker; poll only swimming, time and eating.
- Detect eating/drinking by the localized names of the Food (433) and
  Drink (430) auras instead of hardcoded locale strings and icon paths.
- Drop presence guards on APIs that always exist; use strsplittable and
  strtrim for trigger values.

* equipmentmanager: wake the dining trigger on player health/mana events

Drop dining from the poll: listen to UNIT_HEALTH/UNIT_MANA for the player
while a dining trigger is enabled, so taking the set off once full is
event-driven. Register UNIT_AURA for the player only.

* equipmentmanager: split trigger values with strsplit

strsplittable needs ClassicAPI 1.17.11; strsplit has been there since
1.7.3, so this keeps the minimum where it is.

* equipmentmanager: let the trigger hint wrap

---------

Co-authored-by: Duciel <336374+Duciel@users.noreply.github.com>
Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>
2026-10-27 11:02:44 -05:00
Brues e326cea05e Add radial sweeps to buff/debuff icon display 2026-10-25 20:26:45 -05:00
Brues d9e74b3bc5 Add per-frame reverse toggle for cooldown sweeps 2026-10-25 20:24:12 -05:00
Brues e4f0849816 Pass the draw layer as CreateTexture's second argument
CreateTexture("OVERLAY") names the texture "OVERLAY" and leaves it on
the default ARTWORK layer. Pass nil for the name so the layer applies.
2026-10-25 11:21:01 -05:00
Brues b73ed88346 Split chat faction and race icons into separate options 2026-10-23 19:33:08 -05:00
Brues 95e832835e Color chat senders by GUID and drop the who-search option
The engine name-queries a chat sender before the CHAT_MSG event fires,
so GetPlayerInfoByGUID(GetCurrentChatGUID()) resolves every player
sender, including strangers in world channels. Other names in the text
still fall back to C_PlayerCache.GetPlayerInfoByName and libunitscan.

This makes the silent /who lookup for unknown classes obsolete; remove
it along with its FriendsFrame_OnEvent wrapper, config default, GUI
entry and translations.
2026-10-23 02:40:08 -05:00
Brues 935b854073 Remove dead buffdetect setting 2026-10-22 23:25:59 -05:00
Brues df16988d3f Flow unit frame auras: debuffs first on enemies, own size, spacing
Unit frame aura icons are placed by a layout pass after each aura
refresh instead of a fixed grid set at setup. Rows are as tall as
their largest icon, and the debuff block no longer uses the debuff
size to step past buff rows. (Closes #25)

- When buffs and debuffs share a corner, debuffs come first on
  neutral and hostile units.
- New Own Buff Size / Own Debuff Size (-1 = normal size) enlarge the
  player's auras, which C_UnitAuras already lists first.
- New Buff/Debuff X-Spacing and Y-Spacing set the gaps between icons
  and rows; the default of 1 keeps the old look.
- The selfdebuff tooltip remap is gone from unit frames and buffwatch:
  own auras lead the list, so the HARMFUL|PLAYER index is the HARMFUL
  index.
2026-10-22 23:24:15 -05:00
Brues b9f473c049 Test hover against the hit rect, not the bare frame rect
CreateBackdrop widens a frame's hit rect by the border, so mouse focus
and OnEnter/OnLeave cover a band that plain MouseIsOver reports as
outside. Add MouseIsOverHitRect, which passes the frame's hit rect
insets as MouseIsOver offsets, and use it at the unpadded call sites.
The XP bar's hover text follows the same OnEnter/OnLeave flag as its
fade.
2026-10-22 21:36:27 -05:00
Brues 8268af915a energytick: let the five-second rule display as a separate bar or the old shade
The shading bar sat on top of the power bar's own fill and shrank from the
right as the window drained, which reads as part of the mana bar rather than
a countdown over it -- the same problem nameplate castbars solve by living
below the health bar instead of on it.

Show Five Second Rule Style now picks between that: a real StatusBar below
the power bar, backdrop and all, or the original translucent overlay for
anyone who prefers it. The style is read once at module load like the other
structural toggles here, not swapped live -- a /reload picks up a change.
Height and color are only meaningful for the separate-bar style, so the
GUI's Five Second Rule Height and the new appearance.castbar.fsrcolor picker
apply to it alone; the overlay is unchanged from before.

The sweep spark's own dim/solid signal (fsrEnd/fsrGain) is untouched by any
of this -- it keeps dimming through an unconfirmed window regardless of
which display, or none, is shown.

Energy/Mana Ticks -- including both five-second-rule settings -- moves from
Unit Frames > General to Unit Frames > Player, right after Powerbar: they
are C.unitframes.player-only, so General was never the right tab, and
Powerbar is the setting group they actually belong to.
2026-09-22 21:19:12 -05:00
Brues 1108746949 castbar: mark a cast that none of your interrupts can stop
ClassicAPI carries notInterruptible on C_Spell.UnitCastingInfo (arg 8) and
UnitChannelInfo (arg 7); both call sites already stepped over it positionally.
The target, focus and nameplate bars now paint it.

There is no shield art to hang on the icon -- this client ships three
CastingBar textures (Border, Flash, Spark), and Blizzard's shield arrived in
3.x -- so the state is carried by color instead: the bar and the icon's
border both take a new appearance.castbar.shieldcolor, which keeps it legible
on a bar configured without an icon. One api helper paints both so the two
modules cannot drift apart on it.

Dusty rose (.8,.45,.45) rather than a steel grey. Grey is the retail
convention, but pfUI's casting color is already a near-grey pale blue, so the
two separated on brightness alone and washed out against the bar texture. The
rose sits above failcolor in luminance and well below it in saturation, and
the two are further told apart by motion: a failed cast flashes the bar full
and fades, a shielded one fills normally and tints the icon border, which
failcolor never touches.

Not on the player's own bar. The flag is measured against the reader's own
interrupts and silences, so on your own cast it answers a question nobody
asked.

Stamped once at cast start, with the rest of the cast data, rather than
re-polled. ClassicAPI evaluates lazily from the caster's live auras but does
not yet fire the 3.3.5 UNIT_SPELLCAST_INTERRUPTIBLE / _NOT_INTERRUPTIBLE
change events, and polling per frame would undo the event-driven rework these
bars just got -- so a caster who bubbles mid-cast keeps the bar it started
with until the next one.

Two limits worth knowing when it stays dark. The value is relative to your own
kit -- with no interrupt and no silence known it is never reported, whatever
the cast -- and a creature's built-in interrupt immunity lives in
creature_template, which 1.12's SMSG_SPELL_START does not carry, so a boss
with that immunity reads interruptible while your kick still fails on it.
2026-09-13 15:19:42 -05:00