2686 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
Brues bd2dc15c05 Read Innervate's combat log values from the event's arguments
pfUI.events forwards every COMBAT_LOG_EVENT_UNFILTERED value to its
callbacks, so the handler takes them as parameters instead of calling
CombatLogGetCurrentEventInfo.
2026-11-14 23:38:05 -06:00
Brues d78981cd6e Read Reckoning's combat log values from the event's arguments
pfUI.events forwards every COMBAT_LOG_EVENT_UNFILTERED value to its
callbacks, so the handler takes them as parameters instead of calling
CombatLogGetCurrentEventInfo.
2026-11-14 23:36:33 -06:00
Brues d650b9fe4e Count Reckoning's stored attacks from the combat log, not from crits taken
The Reckoning points counted every critical strike taken at talent rank
5 from five CHAT_MSG_COMBAT_* events. Turtle reworked Reckoning: it now
procs on a block, 10-50% by rank, and the crit ranks are "zzOLD" spells,
so the guess showed nothing real.

The points now follow the combat log on pfUI.events. Each
SPELL_EXTRA_ATTACKS aimed at the player adds its amount, up to the
server's cap of 5. The player's next swing clears it, as does a death,
stopping the auto-attack, or a loading screen, all of which empty the
store on the server too.
2026-11-14 23:28:42 -06:00
Brues cf8504d9b2 Swap the hunter bar on swing range changes instead of polling spell range
The hunter bar called C_Spell.IsSpellInRange for Wing Clip and Arcane
Shot 50 times a second while it had an attackable target. It now turns
on C_SwingTimer's range checks for the main hand and the ranged weapon,
and reads both again on PLAYER_SWING_RANGE_UPDATE and at login.

The ranged check is Auto Shot's: the same range row as Arcane Shot
(8-35 yd), with the same Hawk Eye and ranged-weapon bonuses. The melee
check is the server's auto-attack reach, which Raptor Strike swings
with. It is Wing Clip's reach measured flat, without the height
difference, and without the 2.67 yd Wing Clip gets while both units
move. Without a ranged weapon the ranged check has no answer, so the bar
stays on the melee page.
2026-11-14 23:24:41 -06:00
Brues be9c0effb6 Show the chat tab bars from mouse enter and leave instead of polling
The tabmouse option checked both chat panels with IsMouseOver every
frame. The hover frame behind autohide is now its own helper,
EnableHover, and each chat panel gets one. RefreshChat turns it on after
every pass, since that is where the chat frames and tabs move onto the
panels and need to pass their mouse motion on.

The datatext panels are not children of the chats; they sit over the
chats' bottoms in a higher stratum. A panel docked there passes its
motion on as part of its chat, so the tabs stay up over the datatexts.
A panel moved elsewhere does not.

pfUI.chat:UpdateTabs is now the one rule for a tab bar: hidden while a
damage meter is docked over the chat, and with tabmouse only while the
cursor is near. The meter toggle calls it instead of showing the bar
itself, which the old poll would have hidden again on the next frame.
A drag now unlocks the bars before its refresh, so they match the cursor
when it ends.

The hover frame now sits at the lowest level of its frame's subtree,
not the frame's own level. The datatext buttons sit at level 0, under
their panel, so a panel's autohide hover frame was above them.
2026-11-14 22:51:44 -06:00
Brues cf6840f29b Drive autohide from mouse enter and leave instead of polling the cursor
Each autohidden frame ran an OnUpdate that called IsMouseOver 20 times
a second. Its hover frame now takes mouse motion only, so clicks go
through it, and its hit rect reaches 10 px past the frame. OnEnter
shows the frame. OnLeave starts a C_Timer.NewTimer for the fade.

Motion goes to the next frame under the cursor in draw order, not to
the parent. So the hover frame sits at its frame's own level, under the
children, and EnableAutohide makes every descendant pass its motion on
to it. The hover frame passes motion on as well: stacked bars overlap
each other's margins at one level, and a hover frame that ended the
chain could keep the motion from the bar under the cursor.
DisableAutohide turns the propagation off again.

The action bars enable autohide after they create their buttons, so
the walk reaches the buttons.
2026-11-14 22:41:27 -06:00
Brues 3a10747c8a Update the tooltip HP text when the bar's value changes, not every frame
The client fills GameTooltipStatusBar while it builds a unit tooltip and
then moves it as the unit's health changes, so the HP text now hooks the
bar's OnValueChanged instead of polling in an OnUpdate. UpdateUnit also
refreshes it, because a new unit whose value matches the last one's
fires no OnValueChanged.

libhealth gets the name and level from the tooltip's unit GUID instead
of a cached UPDATE_MOUSEOVER_UNIT copy, which could be stale. The raw
"hp / max" text that UpdateUnit set is gone: it never showed, because
the next frame's update always replaced it.
2026-11-14 22:31:52 -06:00
Brues 615f83fc86 Keep the world map draggable on Turtle clients
turtle-wow.lua calls WorldMapFrame_Maximize, which clears OnDragStart and
OnDragStop. The map loader hooked them only once, so when
PLAYER_ENTERING_WORLD ran the loader before the Turtle setup, the drag
handlers were wiped and never restored. The loader now sets both scripts
on every run.

Fixes #82
2026-11-12 11:51:37 -06:00
Brues f6c527d879 Load SavedVariables first so a nil save file can't break boot (#84)
A session without the ClassicAPI DLL loads only API_Check.lua from
pfUI.toc, and the client then writes every unset SavedVariable as
`pfUI_init = nil`. On the next login that file ran after pfUI's
file-scope defaults, so TableIsEmpty(pfUI_init) threw in ADDON_LOADED,
and the variables stayed nil and were saved as nil again on every logout.

The flavor TOCs now set LoadSavedVariablesFirst, so the file-scope
defaults run on the loaded values and replace any nil. The core profiles
overwrite their saved copies at file scope, which makes the
VARIABLES_LOADED hook redundant, and the leftover pfUI_config nil guards
are gone.
2026-11-12 11:24:59 -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 f97ee0df85 env: take the yard unit from translations in unit frames and radar
The yard unit is now a translation key instead of a hardcoded string.

- Translation key "%.1f yd" becomes " yd" in all locales (8 files, 1,138 keys
  each, no key set changes).
- Target distance in unitxp.lua and the radar tooltip, title and range menu
  all read T[" yd"]; hiding the unit still leaves a bare number.
- ruRU gets a cleaner wording for "Hide When Entering Combat".
- zhCN: fix the invalid escapes at translations_zhCN.lua:360 that kept the
  file from loading.
2026-11-12 10:29:28 -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 ee9bd9e31a libunitscan: cache levels only, classes come from C_PlayerCache 2026-11-03 01:17:04 -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 646174fc60 Animations: absolute alpha and setToFinalAlpha, combat feedback text fades on an animation group
Combat feedback text fades in, holds and fades out on an animation group
on the font string instead of an OnUpdate helper frame. Autohide and the
XP/rep bars keep the faded-out alpha with SetToFinalAlpha instead of an
OnFinished that sets it. Pulses, the mail blink, the holiday dusk and the
candle flicker give their alphas with SetFromAlpha / SetToAlpha.
2026-11-03 01:07:03 -06:00
Brues 1c1be19711 Castbars: stripe the fill of uninterruptible casts with a tiled texture
The shield draws img/stripes on OVERLAY, anchored to the fill with
horizontal and vertical tiling so the stripes keep their size as the bar
fills. Castbar text moves from the invalid DIALOG layer (read as ARTWORK)
to OVERLAY so it draws above the stripes.
2026-11-03 01:07:03 -06:00
Brues d2088c455f Unit frames: drain update flags on a queued flush, heal prediction from libpredict callbacks, drop the OnUpdate 2026-11-03 01:07:03 -06:00
Brues 9e2a89de62 Bags: batch event-queued updates on a timer, drop the OnUpdate 2026-11-03 01:07:02 -06:00
Brues 1a6314aa60 XP/rep bars: auto-hide rides a timer, drop the OnUpdate 2026-11-03 01:07:02 -06:00
Brues 70bfc1c443 One-shot event handlers: use EventUtil.RegisterOnceFrameEventAndCallback instead of self-unregistering frames 2026-11-03 01:07:02 -06:00
Brues d143e91f81 Mirror timers: bars fill from duration objects, drop the OnUpdate
A breath, fatigue or feign death bar fills from a duration object that
spans the bar at the timer's rate, and a text binding writes the m:ss
countdown. MirrorTimer_Show and MIRROR_TIMER_PAUSE resync it from
GetMirrorTimerProgress; a paused bar holds its value.
2026-11-03 01:07:02 -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 9187155ea6 Cast bar: the tradeskill spark rides a timer-driven fill, drop the OnUpdate
The per-craft spark of a merged tradeskill chain sits on the edge of an
invisible status bar that fills from cb.craft (ClassicAPI v1.19.1), so
nothing moves it by hand each frame.
2026-11-03 01:07:02 -06:00
Brues 465e87d7d2 Energy tick: the spark rides a timer-driven fill, drop the OnUpdate
The tick frame is a status bar whose invisible fill sweeps each period
from a duration object, with the spark anchored to the fill's edge
(ClassicAPI v1.19.1). A timer at each period's end rolls the sweep over
by whole periods, paused while hidden and caught up as it shows. The
five-second rule ends on its own timer, and the spark's alpha and the
rule bar update on the events that change them. Full mana now hides the
frame on every event, not just on a power update.
2026-11-03 01:07:02 -06:00
Brues 1abeafcec2 Action bars: range and usable state from ClassicAPI events, drop the range ticker
Shown buttons on bars 1-10 enable C_ActionBar.EnableActionRangeCheck for
their slot and take ACTION_RANGE_CHECK_UPDATE; hiding a bar or paging
releases the old slot. ACTION_USABLE_CHANGED refreshes only the changed
slots; ACTIONBAR_UPDATE_USABLE is left to the stance buttons. Requires
ClassicAPI v1.19.1.
2026-11-03 01:07:02 -06:00
Brues cde16e7fbe Action bars: route events to narrow passes, drop the OnUpdate
The pfActionBar frame ran an OnUpdate every frame and fully rebuilt all 140
buttons on events that only touch one part of them.

- Events go where the stock 1.12 bars send them: page and bonus-bar changes
  to the main bar's pager only, UPDATE_BINDINGS to the keybind text only,
  combat, auto repeat and tradeskill events to the active-border pass, and
  aura/form changes to the stance buttons that exist. Full rebuilds are left
  for entering the world, slot changes and the drag grid.
- Keybind text is read once per binding change from a fixed per-button
  command, no longer formatted and gsub'd on every slot update.
- Updates flush on the next frame through RunNextFrame instead of a 40 Hz
  OnUpdate; range is polled on a C_Timer ticker only while glowrange is on.
- Passes check visibility once per bar and walk only its shown buttons; a bar
  refreshes its buttons from OnShow, replacing the polled stale catch-up.
  Range no longer checks the buttons of disabled bars.
- Cooldowns skip CooldownFrame_SetTimer when start/duration/enable are
  unchanged; the active border only touches widgets when its state changes,
  and the "statechange" animation now follows every state change.
- PET_BAR_UPDATE only shows or hides the pet bar instead of re-running its
  whole layout; unlock mode is hooked instead of polled.
- Stance and pet buttons no longer inherit the previous button's oom tint.

pfUI.bars.update is replaced by pfUI.bars.QueueSlot(slot).
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 d7e732981b Timer bars: buffwatch, loot roll, infobox and five-second rule drain from duration objects
Each bar hands its fill to StatusBar:SetTimerDuration instead of a per-frame
SetValue. Buffwatch's time text moves to a duration text binding holding the
cooldown formatter, now exposed as GetTimeFormatter (replacing
GetColoredTimeString, whose only caller this was). The five-second rule's
overlay style becomes a color-filled StatusBar too, so both styles share one
path; energytick's OnUpdate keeps only the tick spark.
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 2a6bddd756 DPSMate dock: find DPSMate by its globals and its first window by settings
The hook gated on an addon folder named exactly DPSMate and a first
window named DPSMate, so repacks under other folder names and renamed
windows never docked (#77). It now waits on login, checks DPSMate's
globals, resolves the first window from DPSMateSettings on every call,
and re-docks after DPSMate rebuilds its frames.
2026-11-02 23:14:27 -06:00
Brues 893524174c Equipment manager: close the slot flyout with the character frame
PopoutsActive checked IsShown, which stays true on the paperdoll and the
sidecar when only CharacterFrame hides. Check IsVisible instead.
2026-11-02 20:08:32 -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 494f176f18 Nameplates: stay in the world stratum, raise the target by level
The overlay inherits the engine plate's world stratum, below every UI
stratum. Moving it to BACKGROUND/LOW put it level-for-level against the
chat panels, so plates drew over the chat. The target now rises above
the other plates by raising its engine frame and re-parenting the
overlay, which carries the subtree's levels along. Debuff icons take
their level from the health bar so ones grown on a raised plate stay
above it.
2026-11-02 01:36:06 -06:00
Brues 23d25c4791 Focus target: follow its token, not its GUID
The focus target frame filtered its unit events on the unit's GUID, which
only arrive while nampower fires its raw-GUID events (NP_EnableUnitEventsGuid
on, NP_EnableUnitEventsGuidFiltering off) and SuperWoW watches every unit.
Without them the bars froze until the focus switched targets (#76).

ClassicAPI fires the focus target's unit events as "focustarget" and the
focus's UNIT_TARGET as "focus" whatever nampower does, so the frame follows
those tokens. The swap check keeps its own GUID cache, since eventunit is
no longer a GUID for that frame.
2026-11-02 01:06:17 -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
Brues 8b239a5532 Castbars: hide idle bars instead of fading them to alpha 0
An idle bar stayed shown at alpha 0, so its OnUpdate ran every frame. The fade-out now ends in Hide, a cast shows the bar, and unlock mode keeps it shown for dragging.
2026-11-01 20:44:24 -06:00
Brues 698dedcb7a Chat: cut the per-line work of the AddMessage hook
- Save the chat history from the frames when leaving the world, through
  GetMessageInfo, instead of on every line. Lines written back from the
  history carry a mark, so they are saved as they are. History is no longer
  recorded while it is off, keeps 30 lines instead of 29, and whispers are
  dimmed in the whisper colour (gsub's match count was taken as red).
- Skip the CLINK and URL passes on lines that cannot hold them.
- Colour player links in one gsub with a callback instead of a gsub per name.
- Read a chat line that several frames show only once, by its line ID.
- Build the timestamp once per second.
- Lay the tabs out on hover only when their bar comes back, not 10 times a
  second.
- Drop ChatFrame_OnUpdate: it only blinks the flash of the bottom button
  pfUI hides. The lines fade in the engine's update.
2026-11-01 19:59:53 -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
Brues 3651341697 Scroll every chat copy box to the newest line when it opens
The caret at the end scrolled only the box with the focus, and each
visible chat frame's box takes the focus as it opens, so only the last
one shown reached the bottom. Even that one stopped short: 1.12's
OnCursorChanged has no input context, so ScrollCursorIntoView lets the
last line clip.

Each box now measures its scroll box and scrolls it to the end on the
next frame, after the edit box has laid the new text out.
2026-11-01 17:22:06 -06:00