Rez icon fallback for raid frames and other healers' announcements
(libpredict), libdebuff changes, and no UI-Scale reload prompt on
window resize (api).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ClassicAPI replaces its Interface Options frame with a port of retail's
Settings window (SettingsPanel). The InterfaceOptionsFrame* names now
alias that window's frames, and the old skin errors on them: the window
has no title region to look up and the list has no fixed rows.
The skin now dresses SettingsPanel: the window, its title bar and close
button, the borders around the category list and the settings, the
Game and AddOns tabs, the search box, and the Close, Apply and Defaults
buttons. Both lists scroll with MinimalScrollBar.
The category rows are pooled and unnamed. A row gets its skin when the
list acquires it, and one rebuild of the list acquires the rows that
exist already. On every state change a row sets its highlight art and
swaps its toggle's plus/minus textures, so the highlight is kept at the
class color and the toggle at pfUI's +/- box, as on the old list.
SkinCollapseButton now accepts an unnamed button for this.
ClassicAPI's own pages are now vertical layouts of retail's setting
controls. The settings rows are pooled too, and each gets its skin when
the list acquires it: the checkbox, the slider and its steppers, the
dropdown and its steppers, ClassicAPI's number box, and the buttons,
key binding keys included. A dropdown's menu takes pfUI's menu style,
because its template names the stock style.
The controls show their tooltips in SettingsTooltip, which joins the
tooltips the Tooltips skin gives pfUI's backdrop.
ClassicAPI v1.20.6 and older have no SettingsPanel. There the skin
still dresses the Interface Options frame and the numbered controls of
ClassicAPI's own pages, as before, so pfUI works on either release.
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.
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.
pfUI.events forwards every COMBAT_LOG_EVENT_UNFILTERED value to its
callbacks, so the handler takes them as parameters instead of calling
CombatLogGetCurrentEventInfo.
pfUI.events forwards every COMBAT_LOG_EVENT_UNFILTERED value to its
callbacks, so the handler takes them as parameters instead of calling
CombatLogGetCurrentEventInfo.
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.
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.
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.
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.
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.
PoH heals the target's subgroup, counting only members within 30 yards of
the target (TARGET_UNIT_FRIEND_AND_PARTY, radius 30). A roster cache keyed
by name replaces the per-cast raid scans, and own and foreign casts share
one target helper. A foreign heal with no spell target is a self-cast, so
it now predicts on the caster instead of being dropped.
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
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.
* 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>
- 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.
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.
- 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.
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
RememberByUnit fed C_PlayerCache.RememberPlayer from group, target, mouseover
and nameplate units. It added nothing the engine's name cache doesn't already
learn, and for out-of-range group members it passed a nil class and raised
RememberPlayer's usage error.
The hand-rolled pattern escaping missed '.', '$' and '%', so a title
or texture filter with those characters could match the wrong object.
Every caller passes a literal substring, so search with plain find
instead. One Matches helper replaces the three copies of the filter
check, and the doc header now lists the real arguments.
AlignToPosition reads its corner pairs from a table. SetAutoPoint and
GetBestAnchor share one 3x3 screen-grid helper, which also gives an
anchor to frames centered exactly on a grid line. ConvertFrameAnchor
resolves the x and y offsets independently.
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
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.
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.
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.
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.
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.
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.
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.
ClassicAPI v1.19.1 moves a status bar texture's rect with the fill, so
the prediction starts at GetStatusBarTexture() and is only as wide as the
incoming heal. It follows the health bar while it animates instead of
sitting at the final value.
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.
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).
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.
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.
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.