16 Commits
Author SHA1 Message Date
Brues 6936fd894b Replace unusable tooltip scan with C_PlayerInfo.CanUseItem
The libtipscan approach scanned each bag/bank item's tooltip for red
text, then had to carve out broken (0-durability) items since those also
color red. C_PlayerInfo.CanUseItem checks item requirements directly
(proficiency, level, class/race, skill/spell/rep) and ignores item
state, so broken-but-equippable gear is never flagged and the durability
exclusion drops out entirely. Bank slots resolve through
C_Container.GetContainerItemID(-1, slot) instead of the inventory-slot
workaround the scanner needed.
2026-07-12 13:48:36 -05:00
Brues b5277ea457 These modules aren't new anymore 2026-07-11 16:04:58 -05:00
Brues 63f0dcbf7a Use GetInventoryItemID instead of parsing link 2026-07-11 13:18:48 -05:00
Brues 0344bff471 cleanup 2026-07-11 12:59:33 -05:00
Brues 1510969105 Unused strings 2026-07-11 12:57:07 -05:00
Brues 6e7361c543 Removed redundant compare.basestats setting
Just disable the module if you don't want stat comparison
2026-07-11 12:43:15 -05:00
Brues 2e20a03cbd Restore Inspect UI frame skin
removed during the tbc purge
2026-07-11 12:36:03 -05:00
Brues 7389c241a4 using GetSpellInfo with just a spell id is dangerous
Handful of addons will polyfill their own GetSpellInfo that only accept (bookSlot, bookType) so it's only safe to use C_Spell.GetSpellInfo with just a spell id
2026-07-11 09:47:46 -05:00
Brues fb5230828c Add Loot History module
A pfUI-native group-loot roll history window built on ClassicAPI's
C_LootHistory backport, adapted from the anniversary Blizzard reference.

- Movable/scrollable window (ESC-closable, Clear button) listing rolled
  items; each row expands to per-player rolls.
- Item icon/name/quality rendered via the !!!ClassicAPI Item mixin
  (Item:CreateFromItemLink + ContinueOnItemLoad), so uncached items load
  asynchronously and repaint their row.
- Winner shown on the collapsed row (name/roll/roll-type) and marked in the
  expanded list with a checkmark left of the name (matches the reference).
- Expansion state keys on the stable rollID; events (FULL_UPDATE /
  ROLL_CHANGED / ROLL_COMPLETE) drive a rebuild while shown, and re-attach
  the scroll child so a growing list scrolls without a /reload.
- Toggle via /loothistory or /lh; optional auto-show on new rolls behind
  loothistory.autoshow (default off).
2026-07-11 00:02:31 -05:00
Brues 7aee348a70 Bump min version to 1.6.4 2026-07-10 20:27:16 -05:00
Brues 2a5f480839 Show addon dependencies in tooltip
Add display of required and optional addon dependencies to the addons tooltip. Introduce AddDependencyLines helper in modules/addons.lua which lists dependencies with color coding: green for loaded, yellow for present but unloaded, and red for missing (uses new T["Missing"]). Store dependency arrays on addon frames (adeps / aoptdeps) using GetAddOnDependencies and C_AddOns.GetAddOnOptionalDependencies. Add translation keys 'Dependencies', 'Optional Dependencies', and 'Missing' to env/translations_enUS.lua.
2026-07-10 20:26:05 -05:00
Brues 23d1ab840c Show sell value in tooltip when merchant hidden
When the MerchantFrame is not shown, display the item's total vendor sell value on the tooltip. Adds a guard to call SetTooltipMoney(frame, sell * count) if sell > 0 so stacked items show their combined sell price.
2026-07-10 13:23:52 -05:00
Brues 13a08b0ea3 Restore hooksecurefunc 2026-07-09 23:01:52 -05:00
Brues a2177fbf49 Restore HookScript 2026-07-09 22:55:26 -05:00
Brues 9cd83e90ad Added GetNoNameObject debugging 2026-07-09 22:31:58 -05:00
Brues 9bcc11e64f removed tbc logic 2026-07-09 22:26:32 -05:00
59 changed files with 773 additions and 194 deletions
+25
View File
@@ -542,6 +542,21 @@ do -- create a scope so we don't have to worry about upvalue collisions
end end
end end
-- [ HookScript ]
-- Securely post-hooks a script handler.
-- 'f' [frame] the frame which needs a hook
-- 'script' [string] the handler to hook
-- 'func' [function] the function that should be added
function HookScript(f, script, func)
f:HookScript(script, func)
end
function hooksecurefunc(tbl, name, func)
if type(tbl) == "string" then tbl, name, func = _G, tbl, name end
if not tbl or type(tbl[name]) ~= "function" then return end
return _G.hooksecurefunc(tbl, name, func)
end
-- [ HookAddonOrVariable ] -- [ HookAddonOrVariable ]
-- Sets a function to be called automatically once an addon gets loaded -- Sets a function to be called automatically once an addon gets loaded
-- 'addon' [string] addon or variable name -- 'addon' [string] addon or variable name
@@ -1562,6 +1577,16 @@ end
-- 'arg1' [string] -- 'arg1' [string]
-- return object -- return object
function pfUI.api.GetNoNameObject(frame, objtype, layer, arg1, arg2) function pfUI.api.GetNoNameObject(frame, objtype, layer, arg1, arg2)
-- A nil/non-frame parent otherwise dies on frame:GetRegions()/:GetChildren()
-- below, and the traceback stops here — useless, since all callers share this
-- line. pfUI shadows Lua's `error` (dropping the level arg and not throwing),
-- so fold the caller frame in via debugstack to name the offending skin, then
-- bail so we don't fall through and crash on frame:GetRegions() anyway.
if type(frame) ~= "table" or not frame.GetRegions then
error("GetNoNameObject: invalid parent frame\n" .. debugstack(2, 3, 0))
return
end
local arg1 = arg1 and gsub(arg1, "([%+%-%*%(%)%?%[%]%^])", "%%%1") local arg1 = arg1 and gsub(arg1, "([%+%-%*%(%)%?%[%]%^])", "%%%1")
local arg2 = arg2 and gsub(arg2, "([%+%-%*%(%)%?%[%]%^])", "%%%1") local arg2 = arg2 and gsub(arg2, "([%+%-%*%(%)%?%[%]%^])", "%%%1")
+2
View File
@@ -196,6 +196,8 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("loot", nil, "rollannounce", "0") pfUI:UpdateConfig("loot", nil, "rollannounce", "0")
pfUI:UpdateConfig("loot", nil, "raritytimer", "1") pfUI:UpdateConfig("loot", nil, "raritytimer", "1")
pfUI:UpdateConfig("loothistory", nil, "autoshow", "0")
pfUI:UpdateConfig("unitframes", nil, "disable", "0") pfUI:UpdateConfig("unitframes", nil, "disable", "0")
pfUI:UpdateConfig("unitframes", nil, "pastel", "1") pfUI:UpdateConfig("unitframes", nil, "pastel", "1")
pfUI:UpdateConfig("unitframes", nil, "custom", "0") pfUI:UpdateConfig("unitframes", nil, "custom", "0")
-11
View File
@@ -28,17 +28,6 @@ ACTIONBAR_SECURE_TEMPLATE_BUTTON = nil
UNITFRAME_SECURE_TEMPLATE = nil UNITFRAME_SECURE_TEMPLATE = nil
--[[ Vanilla API Extensions ]]-- --[[ Vanilla API Extensions ]]--
-- Safe post-hook helper. The global `hooksecurefunc` belongs to ClassicAPI
-- (its C implementation); this wrapper only adds pfUI's missing-target guard:
-- ClassicAPI errors when target[name] isn't a function, whereas a lot of our
-- call sites hook optional/late-loaded frames and rely on a silent no-op.
-- Normalizes the string form, skips when the target is absent, then delegates
-- to the C version (uncapped args, callback-pcall, taint parity).
function pfUI.hooksecurefunc(tbl, name, func)
if type(tbl) == "string" then tbl, name, func = _G, tbl, name end
if not tbl or type(tbl[name]) ~= "function" then return end
return _G.hooksecurefunc(tbl, name, func)
end
do -- GetItemInfo do -- GetItemInfo
local name, link, rarity, minlevel, itype, isubtype, stack local name, link, rarity, minlevel, itype, isubtype, stack
-1
View File
@@ -138,7 +138,6 @@ pfUI_translation["deDE"] = {
["Combat Timer"] = nil, ["Combat Timer"] = nil,
["Combopoint Height"] = nil, ["Combopoint Height"] = nil,
["Combopoint Width"] = nil, ["Combopoint Width"] = nil,
["Compare Item Base Stats"] = nil,
["Components"] = nil, ["Components"] = nil,
["Config UI Settings"] = nil, ["Config UI Settings"] = nil,
["Configuration"] = nil, ["Configuration"] = nil,
+7 -1
View File
@@ -19,6 +19,7 @@ pfUI_translation["enUS"] = {
["Align Chat Windows"] = nil, ["Align Chat Windows"] = nil,
["Aligned Position"] = nil, ["Aligned Position"] = nil,
["All messages will be forwarded to:"] = nil, ["All messages will be forwarded to:"] = nil,
["All players passed"] = nil,
["Alt-Click Action"] = nil, ["Alt-Click Action"] = nil,
["Always Allow Drag Via Shift Key"] = nil, ["Always Allow Drag Via Shift Key"] = nil,
["Always Show"] = nil, ["Always Show"] = nil,
@@ -119,6 +120,7 @@ pfUI_translation["enUS"] = {
["Chat Bubble Transparency"] = nil, ["Chat Bubble Transparency"] = nil,
["Chat Default Brackets"] = nil, ["Chat Default Brackets"] = nil,
["Class"] = nil, ["Class"] = nil,
["Clear"] = nil,
["Clear Rolls"] = nil, ["Clear Rolls"] = nil,
["Click Action"] = nil, ["Click Action"] = nil,
["Click Casting"] = nil, ["Click Casting"] = nil,
@@ -138,7 +140,6 @@ pfUI_translation["enUS"] = {
["Combat Timer"] = nil, ["Combat Timer"] = nil,
["Combopoint Height"] = nil, ["Combopoint Height"] = nil,
["Combopoint Width"] = nil, ["Combopoint Width"] = nil,
["Compare Item Base Stats"] = nil,
["Components"] = nil, ["Components"] = nil,
["Config UI Settings"] = nil, ["Config UI Settings"] = nil,
["Configuration"] = nil, ["Configuration"] = nil,
@@ -195,6 +196,7 @@ pfUI_translation["enUS"] = {
["Deficit"] = nil, ["Deficit"] = nil,
["Delete profile"] = nil, ["Delete profile"] = nil,
["Delete / Reset"] = nil, ["Delete / Reset"] = nil,
["Dependencies"] = nil,
["Descending"] = nil, ["Descending"] = nil,
["Description Font"] = nil, ["Description Font"] = nil,
["Description Font Size"] = nil, ["Description Font Size"] = nil,
@@ -477,6 +479,7 @@ pfUI_translation["enUS"] = {
["Look & Feel"] = nil, ["Look & Feel"] = nil,
["Loot"] = nil, ["Loot"] = nil,
["Loot & Spam"] = nil, ["Loot & Spam"] = nil,
["Loot History"] = nil,
["Macro Text Color"] = nil, ["Macro Text Color"] = nil,
["Macro Text Size"] = nil, ["Macro Text Size"] = nil,
["Main Actionbar"] = nil, ["Main Actionbar"] = nil,
@@ -499,6 +502,7 @@ pfUI_translation["enUS"] = {
["Menu Font Size"] = nil, ["Menu Font Size"] = nil,
["Messages are no longer forwarded to:"] = nil, ["Messages are no longer forwarded to:"] = nil,
["Middle Mouse Button"] = nil, ["Middle Mouse Button"] = nil,
["Missing"] = nil,
["Minimap"] = nil, ["Minimap"] = nil,
["Minimap Panel"] = nil, ["Minimap Panel"] = nil,
["Minimap Size (|cffffaaaaExperimental|r)"] = nil, ["Minimap Size (|cffffaaaaExperimental|r)"] = nil,
@@ -552,6 +556,7 @@ pfUI_translation["enUS"] = {
["Only Show Own Debuffs (|cffffaaaaExperimental|r)"] = nil, ["Only Show Own Debuffs (|cffffaaaaExperimental|r)"] = nil,
["Only Show Target Castbar"] = nil, ["Only Show Target Castbar"] = nil,
["On State Change"] = nil, ["On State Change"] = nil,
["Optional Dependencies"] = nil,
["Options"] = nil, ["Options"] = nil,
["Orientation"] = nil, ["Orientation"] = nil,
["Other Panel: Minimap"] = nil, ["Other Panel: Minimap"] = nil,
@@ -645,6 +650,7 @@ pfUI_translation["enUS"] = {
["Resting"] = nil, ["Resting"] = nil,
["Reveal Unexplored Areas"] = nil, ["Reveal Unexplored Areas"] = nil,
["Switch to current zone"] = nil, ["Switch to current zone"] = nil,
["Retrieving item information..."] = nil,
["Right"] = nil, ["Right"] = nil,
["Right Actionbar"] = nil, ["Right Actionbar"] = nil,
["Right Anchor"] = nil, ["Right Anchor"] = nil,
-1
View File
@@ -138,7 +138,6 @@ pfUI_translation["esES"] = {
["Combat Timer"] = "Temporizador de combate", ["Combat Timer"] = "Temporizador de combate",
["Combopoint Height"] = nil, ["Combopoint Height"] = nil,
["Combopoint Width"] = nil, ["Combopoint Width"] = nil,
["Compare Item Base Stats"] = "Comparar estadísticas bases de objetos",
["Components"] = "Componentes", ["Components"] = "Componentes",
["Config UI Settings"] = nil, ["Config UI Settings"] = nil,
["Configuration"] = "Configuración", ["Configuration"] = "Configuración",
-1
View File
@@ -138,7 +138,6 @@ pfUI_translation["frFR"] = {
["Combat Timer"] = "Chronomètre de combat", ["Combat Timer"] = "Chronomètre de combat",
["Combopoint Height"] = nil, ["Combopoint Height"] = nil,
["Combopoint Width"] = nil, ["Combopoint Width"] = nil,
["Compare Item Base Stats"] = "Compare les stats de base d'un objet",
["Components"] = "Composants", ["Components"] = "Composants",
["Config UI Settings"] = nil, ["Config UI Settings"] = nil,
["Configuration"] = "Configuration", ["Configuration"] = "Configuration",
-1
View File
@@ -138,7 +138,6 @@ pfUI_translation["koKR"] = {
["Combat Timer"] = "전투 타이머", ["Combat Timer"] = "전투 타이머",
["Combopoint Height"] = nil, ["Combopoint Height"] = nil,
["Combopoint Width"] = nil, ["Combopoint Width"] = nil,
["Compare Item Base Stats"] = nil,
["Components"] = nil, ["Components"] = nil,
["Config UI Settings"] = nil, ["Config UI Settings"] = nil,
["Configuration"] = "구성", ["Configuration"] = "구성",
-1
View File
@@ -138,7 +138,6 @@ pfUI_translation["ruRU"] = {
["Combat Timer"] = "Таймер боя", ["Combat Timer"] = "Таймер боя",
["Combopoint Height"] = nil, ["Combopoint Height"] = nil,
["Combopoint Width"] = nil, ["Combopoint Width"] = nil,
["Compare Item Base Stats"] = "Сравнивать базовые характеристики предмета",
["Components"] = "Компоненты", ["Components"] = "Компоненты",
["Config UI Settings"] = "Настройка параметров пользовательского интерфейса", ["Config UI Settings"] = "Настройка параметров пользовательского интерфейса",
["Configuration"] = "Конфигурация", ["Configuration"] = "Конфигурация",
-1
View File
@@ -138,7 +138,6 @@ pfUI_translation["zhCN"] = {
["Combat Timer"] = "战斗计时器", ["Combat Timer"] = "战斗计时器",
["Combopoint Height"] = "连击点高度", ["Combopoint Height"] = "连击点高度",
["Combopoint Width"] = "连击点宽度", ["Combopoint Width"] = "连击点宽度",
["Compare Item Base Stats"] = "基于属性的装备对比",
["Components"] = "组件", ["Components"] = "组件",
["Config UI Settings"] = "界面设置", ["Config UI Settings"] = "界面设置",
["Configuration"] = "配置", ["Configuration"] = "配置",
-1
View File
@@ -138,7 +138,6 @@ pfUI_translation["zhTW"] = {
["Combat Timer"] = "戰鬥計時器", ["Combat Timer"] = "戰鬥計時器",
["Combopoint Height"] = nil, ["Combopoint Height"] = nil,
["Combopoint Width"] = nil, ["Combopoint Width"] = nil,
["Compare Item Base Stats"] = "基於屬性的裝備對比",
["Components"] = "組件", ["Components"] = "組件",
["Config UI Settings"] = nil, ["Config UI Settings"] = nil,
["Configuration"] = "配置", ["Configuration"] = "配置",
+1
View File
@@ -78,4 +78,5 @@
<Include file="..\modules\unitxp.lua"/> <Include file="..\modules\unitxp.lua"/>
<Include file="..\modules\bgscore.lua"/> <Include file="..\modules\bgscore.lua"/>
<Include file="..\modules\equipmentmanager.lua"/> <Include file="..\modules\equipmentmanager.lua"/>
<Include file="..\modules\loothistory.lua"/>
</Ui> </Ui>
+1
View File
@@ -1,5 +1,6 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/"> <Ui xmlns="http://www.blizzard.com/wow/ui/">
<Include file="..\skins\blizzard\character.lua"/> <Include file="..\skins\blizzard\character.lua"/>
<Include file="..\skins\blizzard\inspect.lua"/>
<Include file="..\skins\blizzard\spellbook.lua"/> <Include file="..\skins\blizzard\spellbook.lua"/>
<Include file="..\skins\blizzard\friends.lua"/> <Include file="..\skins\blizzard\friends.lua"/>
<Include file="..\skins\blizzard\talents.lua"/> <Include file="..\skins\blizzard\talents.lua"/>
+5 -4
View File
@@ -897,7 +897,7 @@ local INSTANT_HOT_COOLDOWN = 1.0 -- 1 Sekunde Cooldown (GCD ist 1.5s)
local pendingHots = {} local pendingHots = {}
-- Gather Data by User Actions -- Gather Data by User Actions
pfUI.hooksecurefunc("CastSpell", function(id, bookType) hooksecurefunc("CastSpell", function(id, bookType)
if not libpredict.sender.enabled then return end if not libpredict.sender.enabled then return end
local effect, rank = libspell.GetSpellInfo(id, bookType) local effect, rank = libspell.GetSpellInfo(id, bookType)
if not effect then return end if not effect then return end
@@ -950,7 +950,7 @@ pfUI.hooksecurefunc("CastSpell", function(id, bookType)
end end
end) end)
pfUI.hooksecurefunc("CastSpellByName", function(effect, target) hooksecurefunc("CastSpellByName", function(effect, target)
if not libpredict.sender.enabled then return end if not libpredict.sender.enabled then return end
local effect, rank = libspell.GetSpellInfo(effect) local effect, rank = libspell.GetSpellInfo(effect)
if not effect then return end if not effect then return end
@@ -1014,13 +1014,14 @@ pfUI.hooksecurefunc("CastSpellByName", function(effect, target)
end end
end) end)
pfUI.hooksecurefunc("UseAction", function(slot, target, selfcast) hooksecurefunc("UseAction", function(slot, target, selfcast)
if not libpredict.sender.enabled then return end if not libpredict.sender.enabled then return end
if not IsCurrentAction(slot) then return end if not IsCurrentAction(slot) then return end
local kind, id = GetActionInfo(slot) local kind, id = GetActionInfo(slot)
local effect, rank local effect, rank
if kind == "spell" then if kind == "spell" then
effect, rank = GetSpellInfo(id) local spellInfo = C_Spell.GetSpellInfo(id)
effect, rank = spellInfo.name, spellInfo.rank
elseif kind == "macro" then elseif kind == "macro" then
effect, rank = GetMacroSpell(id) effect, rank = GetMacroSpell(id)
end end
+1 -1
View File
@@ -54,6 +54,6 @@ end
pfUI.api.libtooltip = libtooltip pfUI.api.libtooltip = libtooltip
pfUI.hooksecurefunc(GameTooltip, "SetBagItem", function(self, container, slot) hooksecurefunc(GameTooltip, "SetBagItem", function(self, container, slot)
_, libtooltip.itemCount = GetContainerItemInfo(container, slot) _, libtooltip.itemCount = GetContainerItemInfo(container, slot)
end) end)
+7 -6
View File
@@ -228,8 +228,8 @@ pfUI.libdebuff_spell_go_hooks["libtotem"] = function(spellId)
-- use pending name/icon if available (set by CastSpellByName hook), else GetSpellInfo -- use pending name/icon if available (set by CastSpellByName hook), else GetSpellInfo
local name = active[slot].pending_name local name = active[slot].pending_name
local icon = active[slot].pending_icon local icon = active[slot].pending_icon
if not name and GetSpellInfo then if not name then
name = GetSpellInfo(spellId) name = C_Spell.GetSpellName(spellId)
end end
active[slot].name = name active[slot].name = name
active[slot].duration = data.duration active[slot].duration = data.duration
@@ -241,14 +241,14 @@ pfUI.libdebuff_spell_go_hooks["libtotem"] = function(spellId)
end end
-- Hook CastSpellByName to store pending name/icon per slot -- Hook CastSpellByName to store pending name/icon per slot
pfUI.hooksecurefunc("CastSpellByName", function(effect, target) hooksecurefunc("CastSpellByName", function(effect, target)
local name, rank, icon, _, _, _, spellId = libspell.GetSpellInfo(effect) local name, rank, icon, _, _, _, spellId = libspell.GetSpellInfo(effect)
if not name then return end if not name then return end
libtotem:CheckAddQueue(name, rank, icon, spellId) libtotem:CheckAddQueue(name, rank, icon, spellId)
end) end)
-- Hook CastSpell to store pending name/icon per slot -- Hook CastSpell to store pending name/icon per slot
pfUI.hooksecurefunc("CastSpell", function(id, bookType) hooksecurefunc("CastSpell", function(id, bookType)
if not id or not bookType then return end if not id or not bookType then return end
if bookType ~= BOOKTYPE_SPELL and bookType ~= BOOKTYPE_PET then return end if bookType ~= BOOKTYPE_SPELL and bookType ~= BOOKTYPE_PET then return end
local name, rank, icon, _, _, _, spellId = libspell.GetSpellInfo(id, bookType) local name, rank, icon, _, _, _, spellId = libspell.GetSpellInfo(id, bookType)
@@ -259,13 +259,14 @@ end)
-- Hook UseAction. GetActionInfo + GetMacroSpell give us the spellID -- Hook UseAction. GetActionInfo + GetMacroSpell give us the spellID
-- directly for both spell-action and macro-action slots, so the -- directly for both spell-action and macro-action slots, so the
-- tooltip-scan fallback (and the "no spellId available" caveat) goes away. -- tooltip-scan fallback (and the "no spellId available" caveat) goes away.
pfUI.hooksecurefunc("UseAction", function(slot, target, selfcast) hooksecurefunc("UseAction", function(slot, target, selfcast)
if not IsCurrentAction(slot) then return end if not IsCurrentAction(slot) then return end
local kind, id = GetActionInfo(slot) local kind, id = GetActionInfo(slot)
local name, rank, spellID local name, rank, spellID
if kind == "spell" then if kind == "spell" then
spellID = id spellID = id
name, rank = GetSpellInfo(id) local spellInfo = C_Spell.GetSpellInfo(id)
name, rank = spellInfo.name, spellInfo.rank
elseif kind == "macro" then elseif kind == "macro" then
name, rank, spellID = GetMacroSpell(id) name, rank, spellID = GetMacroSpell(id)
end end
+19
View File
@@ -217,6 +217,21 @@ pfUI:RegisterModule("addons", function ()
pfUI.addons.list:RegisterEvent("PLAYER_ENTERING_WORLD") pfUI.addons.list:RegisterEvent("PLAYER_ENTERING_WORLD")
pfUI.addons.list:SetHeight(GetNumAddOns() * 25 + 26) pfUI.addons.list:SetHeight(GetNumAddOns() * 25 + 26)
local function AddDependencyLines(header, deps)
if not deps or table.getn(deps) == 0 then return end
GameTooltip:AddLine(" ")
GameTooltip:AddLine(header .. ":", .2, 1, .8)
for _, dep in ipairs(deps) do
if IsAddOnLoaded(dep) then
GameTooltip:AddLine(" " .. dep, .5, 1, .5)
elseif C_AddOns.DoesAddOnExist(dep) then
GameTooltip:AddLine(" " .. dep, 1, .82, 0)
else
GameTooltip:AddLine(" " .. dep .. " (" .. T["Missing"] .. ")", 1, .4, .4)
end
end
end
local function AddonOnEnter() local function AddonOnEnter()
this:SetBackdropBorderColor(1,1,1,.08) this:SetBackdropBorderColor(1,1,1,.08)
@@ -231,6 +246,8 @@ pfUI:RegisterModule("addons", function ()
end end
GameTooltip:AddLine(this.anote, .75,.75,.75,1) GameTooltip:AddLine(this.anote, .75,.75,.75,1)
AddDependencyLines(T["Dependencies"], this.adeps)
AddDependencyLines(T["Optional Dependencies"], this.aoptdeps)
GameTooltip:SetWidth(180) GameTooltip:SetWidth(180)
GameTooltip:Show() GameTooltip:Show()
end end
@@ -272,6 +289,8 @@ pfUI:RegisterModule("addons", function ()
frame.anote = anote frame.anote = anote
frame.aauthor = aauthor frame.aauthor = aauthor
frame.aversion = aversion frame.aversion = aversion
frame.adeps = { GetAddOnDependencies(i) } -- required (.toc Dependencies)
frame.aoptdeps = { C_AddOns.GetAddOnOptionalDependencies(i) } -- optional (.toc OptionalDeps)
frame:SetWidth(340) frame:SetWidth(340)
frame:SetHeight(25) frame:SetHeight(25)
+1 -1
View File
@@ -490,7 +490,7 @@ pfUI:RegisterModule("castbar", function ()
-- (the config knob is read at event time so toggling takes effect on the -- (the config knob is read at event time so toggling takes effect on the
-- next craft without a /reload). DoTradeSkill is synchronous; the server -- next craft without a /reload). DoTradeSkill is synchronous; the server
-- roundtrip to SPELLCAST_START gives us plenty of time after this hook. -- roundtrip to SPELLCAST_START gives us plenty of time after this hook.
pfUI.hooksecurefunc("DoTradeSkill", function(index, num) hooksecurefunc("DoTradeSkill", function(index, num)
if pfUI.castbar.player then if pfUI.castbar.player then
pfUI.castbar.player.pendingTradeskillCount = tonumber(num) or 1 pfUI.castbar.player.pendingTradeskillCount = tonumber(num) or 1
end end
+2 -2
View File
@@ -24,7 +24,7 @@ pfUI:RegisterModule("chat", function ()
end end
end end
pfUI.hooksecurefunc("UnitPopup_OnClick", function(self) hooksecurefunc("UnitPopup_OnClick", function(self)
if this.value == "IGNORE_PLAYER" then if this.value == "IGNORE_PLAYER" then
AddIgnore(_G[UIDROPDOWNMENU_INIT_MENU].name) AddIgnore(_G[UIDROPDOWNMENU_INIT_MENU].name)
end end
@@ -449,7 +449,7 @@ pfUI:RegisterModule("chat", function ()
end end
end end
pfUI.hooksecurefunc("FCF_SaveDock", pfUI.chat.RefreshChat) hooksecurefunc("FCF_SaveDock", pfUI.chat.RefreshChat)
if C.chat.global.tabmouse == "1" then if C.chat.global.tabmouse == "1" then
pfUI.chat.mouseovertab = CreateFrame("Frame") pfUI.chat.mouseovertab = CreateFrame("Frame")
+1 -1
View File
@@ -136,5 +136,5 @@ pfUI:RegisterModule("cooldown", function ()
-- vanilla does not have a cooldown frame type, so we hook the -- vanilla does not have a cooldown frame type, so we hook the
-- regular SetTimer function that each one is calling. -- regular SetTimer function that each one is calling.
pfUI.hooksecurefunc("CooldownFrame_SetTimer", SetCooldown) hooksecurefunc("CooldownFrame_SetTimer", SetCooldown)
end) end)
+4 -6
View File
@@ -88,7 +88,7 @@ pfUI:RegisterModule("eqcompare", function ()
local prevMerchant = ShoppingTooltip1.SetMerchantCompareItem local prevMerchant = ShoppingTooltip1.SetMerchantCompareItem
local function SetMerchantCompareItem(self, index, compareItem) local function SetMerchantCompareItem(self, index, compareItem)
if C.tooltip.compare.basestats == "1" and compareItem == 1 then if compareItem == 1 then
ShowCompareItem(nil, GetMerchantItemLink(index), 1) ShowCompareItem(nil, GetMerchantItemLink(index), 1)
return false return false
end end
@@ -97,7 +97,7 @@ pfUI:RegisterModule("eqcompare", function ()
local prevAuction = ShoppingTooltip1.SetAuctionCompareItem local prevAuction = ShoppingTooltip1.SetAuctionCompareItem
local function SetAuctionCompareItem(self, type, index, compareItem) local function SetAuctionCompareItem(self, type, index, compareItem)
if C.tooltip.compare.basestats == "1" and compareItem == 1 then if compareItem == 1 then
ShowCompareItem(nil, GetAuctionItemLink(type, index), 1) ShowCompareItem(nil, GetAuctionItemLink(type, index), 1)
return false return false
end end
@@ -132,15 +132,13 @@ pfUI:RegisterModule("eqcompare", function ()
local function makeHook(getter) local function makeHook(getter)
return function(tooltip, arg1, arg2, arg3) return function(tooltip, arg1, arg2, arg3)
if C.tooltip.compare.basestats == "1" then ShowCompareItem(tooltip, getter(arg1, arg2, arg3))
ShowCompareItem(tooltip, getter(arg1, arg2, arg3))
end
end end
end end
local function HookTooltip(tooltip) local function HookTooltip(tooltip)
for setter, getter in pairs(TooltipHooks) do for setter, getter in pairs(TooltipHooks) do
pfUI.hooksecurefunc(tooltip, setter, makeHook(getter)) hooksecurefunc(tooltip, setter, makeHook(getter))
end end
end end
+2 -2
View File
@@ -150,7 +150,7 @@ pfUI:RegisterSkin("Friends", function ()
end end
-- set positions -- set positions
pfUI.hooksecurefunc("WhoList_Update", function() hooksecurefunc("WhoList_Update", function()
for i = 1, WHOS_TO_DISPLAY do for i = 1, WHOS_TO_DISPLAY do
local level = _G["WhoFrameButton"..i.."Level"] local level = _G["WhoFrameButton"..i.."Level"]
level:ClearAllPoints() level:ClearAllPoints()
@@ -231,7 +231,7 @@ pfUI:RegisterSkin("Friends", function ()
end end
-- set positions -- set positions
pfUI.hooksecurefunc("GuildStatus_Update", function() hooksecurefunc("GuildStatus_Update", function()
for i = 1, GUILDMEMBERS_TO_DISPLAY do for i = 1, GUILDMEMBERS_TO_DISPLAY do
local level = _G["GuildFrameButton"..i.."Level"] local level = _G["GuildFrameButton"..i.."Level"]
level:ClearAllPoints() level:ClearAllPoints()
+1 -1
View File
@@ -86,7 +86,7 @@ pfUI:RegisterModule("gm", function ()
-- pet dropdown -- pet dropdown
-- table.insert(UnitPopupMenus["PET"], "GM_HEADER") -- table.insert(UnitPopupMenus["PET"], "GM_HEADER")
pfUI.hooksecurefunc("UnitPopup_OnClick", function() hooksecurefunc("UnitPopup_OnClick", function()
local dropdownFrame = _G[UIDROPDOWNMENU_INIT_MENU] local dropdownFrame = _G[UIDROPDOWNMENU_INIT_MENU]
local button = this.value local button = this.value
local unit = dropdownFrame.unit local unit = dropdownFrame.unit
+1 -16
View File
@@ -2759,22 +2759,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(nil, T["Show Movement Speed"], C.tooltip, "movespeed", "checkbox") CreateConfig(nil, T["Show Movement Speed"], C.tooltip, "movespeed", "checkbox")
CreateConfig(nil, T["Custom Transparency"], C.tooltip, "alpha") CreateConfig(nil, T["Custom Transparency"], C.tooltip, "alpha")
CreateConfig(nil, T["Status Bar Texture"], C.tooltip.statusbar, "texture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) CreateConfig(nil, T["Status Bar Texture"], C.tooltip.statusbar, "texture", "dropdown", pfUI.gui.dropdowns.uf_bartexture)
CreateConfig(nil, T["Compare Item Base Stats"], C.tooltip.compare, "basestats", "checkbox") CreateConfig(nil, T["Always Show Item Comparison"], C.tooltip.compare, "showalways", "checkbox")
local showAlways = CreateConfig(nil, T["Always Show Item Comparison"], C.tooltip.compare, "showalways", "checkbox")
local function gate()
local on = C.tooltip.compare.basestats == "1"
if on then
showAlways.input:Enable()
showAlways.caption:SetTextColor(1, 1, 1)
else
showAlways.input:Disable()
showAlways.caption:SetTextColor(0.5, 0.5, 0.5)
end
end
gate()
pfUI.events:RegisterCallback("config:changed", function(_, cat, key)
if cat == C.tooltip.compare and key == "basestats" then gate() end
end, "eqcompare-showalways-gate")
CreateConfig(nil, T["Always Show Extended Vendor Values"], C.tooltip.vendor, "showalways", "checkbox") CreateConfig(nil, T["Always Show Extended Vendor Values"], C.tooltip.vendor, "showalways", "checkbox")
CreateConfig(U["questitem"], T["Show Related Quest On Questitems"], C.tooltip.questitem, "showquest", "checkbox") CreateConfig(U["questitem"], T["Show Related Quest On Questitems"], C.tooltip.questitem, "showquest", "checkbox")
CreateConfig(U["questitem"], T["Show Required Questitem Count"], C.tooltip.questitem, "showcount", "checkbox") CreateConfig(U["questitem"], T["Show Required Questitem Count"], C.tooltip.questitem, "showcount", "checkbox")
-1
View File
@@ -2,7 +2,6 @@
-- Announces Innervate casts via raid/party/battleground chat -- Announces Innervate casts via raid/party/battleground chat
-- Registers AURA_CAST events directly - zero polling, pure event-driven -- Registers AURA_CAST events directly - zero polling, pure event-driven
pfUI:RegisterNewModule("innervatecall", "Innervate Callout", "DRUID")
pfUI:RegisterModule("innervatecall", function () pfUI:RegisterModule("innervatecall", function ()
-- Requires Nampower for AURA_CAST events -- Requires Nampower for AURA_CAST events
if not GetNampowerVersion then return end if not GetNampowerVersion then return end
+1 -1
View File
@@ -41,7 +41,7 @@ pfUI:RegisterModule("itemcount", function ()
end end
end) end)
pfUI.hooksecurefunc("SetItemRef", function() hooksecurefunc("SetItemRef", function()
if ItemRefTooltip:HasItem() then if ItemRefTooltip:HasItem() then
local _, _, id = ItemRefTooltip:GetItem() local _, _, id = ItemRefTooltip:GetItem()
if id then AddCounts(ItemRefTooltip, id) end if id then AddCounts(ItemRefTooltip, id) end
+2 -2
View File
@@ -392,7 +392,7 @@ pfUI:RegisterModule("loot", function ()
end end
pfUI.loot:RemoveMasterlootMenus() -- remove then add to ensure no duplicate menus pfUI.loot:RemoveMasterlootMenus() -- remove then add to ensure no duplicate menus
pfUI.loot:AddMasterLootMenus() pfUI.loot:AddMasterLootMenus()
pfUI.hooksecurefunc("UnitPopup_OnClick",function() hooksecurefunc("UnitPopup_OnClick",function()
local dropdownFrame = _G[UIDROPDOWNMENU_INIT_MENU] local dropdownFrame = _G[UIDROPDOWNMENU_INIT_MENU]
if not dropdownFrame then return end if not dropdownFrame then return end
local button = this.value local button = this.value
@@ -405,7 +405,7 @@ pfUI:RegisterModule("loot", function ()
end end
end end
end) end)
pfUI.hooksecurefunc("UnitPopup_HideButtons",function() hooksecurefunc("UnitPopup_HideButtons",function()
local dropdownFrame = _G[UIDROPDOWNMENU_INIT_MENU] local dropdownFrame = _G[UIDROPDOWNMENU_INIT_MENU]
local unit = dropdownFrame.unit local unit = dropdownFrame.unit
local name = dropdownFrame.name local name = dropdownFrame.name
+390
View File
@@ -0,0 +1,390 @@
pfUI:RegisterNewModule("loothistory", "Loot History")
pfUI:RegisterModule("loothistory", function ()
local rawborder, border = GetBorderSize()
-- Layout
local ITEM_H, PLAYER_H = 24, 18
local ITEM_W, PLAYER_W = 350, 330
-- rollType constants returned by C_LootHistory.GetPlayerInfo (0/1/2; vanilla
-- has no disenchant roll).
local ROLL_PASS, ROLL_NEED, ROLL_GREED = 0, 1, 2
local ROLL_TEX = {
[ROLL_NEED] = "Interface\\Buttons\\UI-GroupLoot-Dice-Up",
[ROLL_GREED] = "Interface\\Buttons\\UI-GroupLoot-Coin-Up",
[ROLL_PASS] = "Interface\\Buttons\\UI-GroupLoot-Pass-Up",
}
local WINMARK = "Interface\\Buttons\\UI-CheckBox-Check"
local QUESTIONMARK = "Interface\\Icons\\INV_Misc_QuestionMark"
local function ClassColor(class)
local c = class and RAID_CLASS_COLORS[class]
if c then return c.r, c.g, c.b end
return 1, 1, 1
end
-- Paint an item row's icon/name/quality from a loaded Item mixin.
local function RenderItemVisual(f, item)
local r, g, b = 1, 1, 1
local qc = item:GetItemQualityColor()
if qc then r, g, b = qc.r, qc.g, qc.b end
f.icon:SetTexture(item:GetItemIcon())
f.iconbg:SetBackdropBorderColor(r, g, b, 1)
f.name:SetText(item:GetItemName() or UNKNOWN)
f.name:SetTextColor(r, g, b)
end
local function ShowRetrieving(f)
f.icon:SetTexture(QUESTIONMARK)
f.iconbg:SetBackdropBorderColor(1, .3, .3, 1)
f.name:SetText(T["Retrieving item information..."])
f.name:SetTextColor(1, .3, .3)
end
-- expansion state keyed on the stable rollID (survives ring-index shifts)
local expanded = {}
-- ==========================================================================
-- Window
-- ==========================================================================
pfUI.loothistory = CreateFrame("Frame", "pfLootHistory", UIParent)
pfUI.loothistory:SetFrameStrata("DIALOG")
pfUI.loothistory:SetSize(380, 490)
pfUI.loothistory:SetPoint("CENTER", 0, 0)
pfUI.loothistory:SetMovable(true)
pfUI.loothistory:EnableMouse(true)
pfUI.loothistory:RegisterForDrag("LeftButton")
pfUI.loothistory:SetScript("OnDragStart", function() this:StartMoving() end)
pfUI.loothistory:SetScript("OnDragStop", function() this:StopMovingOrSizing() end)
pfUI.loothistory:Hide()
CreateBackdrop(pfUI.loothistory, nil, true, .75)
CreateBackdropShadow(pfUI.loothistory)
tinsert(UISpecialFrames, "pfLootHistory")
pfUI.loothistory.caption = pfUI.loothistory:CreateFontString("Status", "LOW", "GameFontNormal")
pfUI.loothistory.caption:SetFont(pfUI.font_default, C.global.font_size + 4, "OUTLINE")
pfUI.loothistory.caption:SetTextColor(.2, 1, .8, 1)
pfUI.loothistory.caption:SetPoint("TOP", 0, -10)
pfUI.loothistory.caption:SetText(T["Loot History"])
-- close button
pfUI.loothistory.close = CreateFrame("Button", nil, pfUI.loothistory)
pfUI.loothistory.close:SetPoint("TOPRIGHT", -border*2, -border*2)
CreateBackdrop(pfUI.loothistory.close)
pfUI.loothistory.close:SetSize(15, 15)
pfUI.loothistory.close.texture = pfUI.loothistory.close:CreateTexture("pfLootHistoryClose")
pfUI.loothistory.close.texture:SetTexture(pfUI.media["img:close"])
pfUI.loothistory.close.texture:SetPoint("TOPLEFT", pfUI.loothistory.close, "TOPLEFT", 4, -4)
pfUI.loothistory.close.texture:SetPoint("BOTTOMRIGHT", pfUI.loothistory.close, "BOTTOMRIGHT", -4, 4)
pfUI.loothistory.close.texture:SetVertexColor(1, .25, .25, 1)
pfUI.loothistory.close:SetScript("OnEnter", function()
CreateBackdrop(pfUI.loothistory.close)
pfUI.loothistory.close.backdrop:SetBackdropBorderColor(1, .25, .25, 1)
end)
pfUI.loothistory.close:SetScript("OnLeave", function() CreateBackdrop(pfUI.loothistory.close) end)
pfUI.loothistory.close:SetScript("OnClick", function() pfUI.loothistory:Hide() end)
-- clear button
pfUI.loothistory.clear = CreateFrame("Button", nil, pfUI.loothistory, "UIPanelButtonTemplate")
SkinButton(pfUI.loothistory.clear)
pfUI.loothistory.clear:SetSize(60, 16)
pfUI.loothistory.clear:SetPoint("TOPLEFT", 10, -8)
pfUI.loothistory.clear:SetText(T["Clear"])
pfUI.loothistory.clear:SetScript("OnClick", function() C_LootHistory.Clear() end)
-- scroll frame
pfUI.loothistory.scroll = CreateScrollFrame("pfLootHistoryScroll", pfUI.loothistory)
pfUI.loothistory.scroll:SetSize(360, 440)
pfUI.loothistory.scroll:SetPoint("BOTTOM", 0, 10)
pfUI.loothistory.scroll.backdrop = CreateFrame("Frame", nil, pfUI.loothistory.scroll)
pfUI.loothistory.scroll.backdrop:SetFrameLevel(1)
pfUI.loothistory.scroll.backdrop:SetPoint("TOPLEFT", pfUI.loothistory.scroll, "TOPLEFT", -5, 5)
pfUI.loothistory.scroll.backdrop:SetPoint("BOTTOMRIGHT", pfUI.loothistory.scroll, "BOTTOMRIGHT", 5, -5)
CreateBackdrop(pfUI.loothistory.scroll.backdrop, nil, true)
local list = CreateScrollChild("pfLootHistoryList", pfUI.loothistory.scroll)
pfUI.loothistory.list = list
-- ==========================================================================
-- Frame pools
-- ==========================================================================
local itemFrames = {}
local usedPlayers, freePlayers = {}, {}
local FullUpdate -- forward declaration (toggle handlers call it)
local function CreateItemFrame()
local f = CreateFrame("Button", nil, list)
f:SetSize(ITEM_W, ITEM_H)
f:SetBackdrop(pfUI.backdrop_hover)
f:SetBackdropBorderColor(1, 1, 1, .04)
f:EnableMouse(1)
-- expand / collapse toggle
f.toggle = CreateFrame("Button", nil, f)
f.toggle:SetSize(14, 14)
f.toggle:SetPoint("LEFT", 4, 0)
f.toggle:SetScript("OnClick", function()
local id = f.rollID
if id then expanded[id] = not expanded[id]; FullUpdate() end
end)
-- icon + quality-colored border
f.iconbg = CreateFrame("Frame", nil, f)
f.iconbg:SetSize(ITEM_H - 8, ITEM_H - 8)
f.iconbg:SetPoint("LEFT", f.toggle, "RIGHT", 4, 0)
CreateBackdrop(f.iconbg, nil, true)
f.icon = f.iconbg:CreateTexture(nil, "ARTWORK")
f.icon:SetPoint("TOPLEFT", f.iconbg, "TOPLEFT", 2, -2)
f.icon:SetPoint("BOTTOMRIGHT", f.iconbg, "BOTTOMRIGHT", -2, 2)
f.icon:SetTexCoord(.08, .92, .08, .92)
-- winner block (right side, shown for decided rolls)
f.winicon = f:CreateTexture(nil, "OVERLAY")
f.winicon:SetSize(14, 14)
f.winicon:SetPoint("RIGHT", f, "RIGHT", -6, 0)
f.winroll = f:CreateFontString("Status", "OVERLAY", "GameFontNormal")
f.winroll:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
f.winroll:SetPoint("RIGHT", f.winicon, "LEFT", -2, 0)
f.winroll:SetTextColor(1, 1, 1, 1)
f.winname = f:CreateFontString("Status", "OVERLAY", "GameFontNormal")
f.winname:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
f.winname:SetPoint("RIGHT", f.winroll, "LEFT", -4, 0)
f.winname:SetJustifyH("RIGHT")
-- item name (leaves room on the right for the winner block)
f.name = f:CreateFontString("Status", "OVERLAY", "GameFontNormal")
f.name:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
f.name:SetPoint("LEFT", f.iconbg, "RIGHT", 5, 0)
f.name:SetPoint("RIGHT", f, "RIGHT", -100, 0)
f.name:SetJustifyH("LEFT")
f:SetScript("OnEnter", function()
this:SetBackdropBorderColor(1, 1, 1, .08)
if this.itemLink then
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
GameTooltip:SetHyperlink(this.itemLink)
GameTooltip:Show()
end
end)
f:SetScript("OnLeave", function()
this:SetBackdropBorderColor(1, 1, 1, .04)
GameTooltip:Hide()
end)
f:SetScript("OnClick", function()
local id = this.rollID
if id then expanded[id] = not expanded[id]; FullUpdate() end
end)
return f
end
local function CreatePlayerFrame()
local f = CreateFrame("Frame", nil, list)
f:SetSize(PLAYER_W, PLAYER_H)
-- name is indented to leave room for the winner checkmark on its left
f.name = f:CreateFontString("Status", "OVERLAY", "GameFontNormal")
f.name:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
f.name:SetPoint("LEFT", 20, 0)
f.name:SetJustifyH("LEFT")
f.rollicon = f:CreateTexture(nil, "OVERLAY")
f.rollicon:SetSize(16, 16)
f.rollicon:SetPoint("RIGHT", -4, 0)
f.rolltext = f:CreateFontString("Status", "OVERLAY", "GameFontNormal")
f.rolltext:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
f.rolltext:SetPoint("RIGHT", f.rollicon, "LEFT", -3, 0)
f.rolltext:SetTextColor(1, 1, 1, 1)
-- winner checkmark, just left of the player name (matches reference)
f.winmark = f:CreateTexture(nil, "OVERLAY")
f.winmark:SetSize(16, 16)
f.winmark:SetTexture(WINMARK)
f.winmark:SetPoint("RIGHT", f.name, "LEFT", -1, 0)
return f
end
local function RecycleAllPlayers()
for i = 1, table.getn(usedPlayers) do
local pf = usedPlayers[i]
pf:Hide()
table.insert(freePlayers, pf)
end
usedPlayers = {}
end
local function GetPlayerFrame()
local pf = table.remove(freePlayers) or CreatePlayerFrame()
table.insert(usedPlayers, pf)
return pf
end
local function SetToggleTexture(toggle, isExpanded)
if isExpanded then
toggle:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-Up")
toggle:SetPushedTexture("Interface\\Buttons\\UI-MinusButton-Down")
else
toggle:SetNormalTexture("Interface\\Buttons\\UI-PlusButton-Up")
toggle:SetPushedTexture("Interface\\Buttons\\UI-PlusButton-Down")
end
end
-- ==========================================================================
-- Rendering
-- ==========================================================================
local function UpdateItemFrame(f, i)
local rollID, itemLink, numPlayers, isDone, winnerIdx = C_LootHistory.GetItem(i)
f.rollID = rollID
f.itemIdx = i
f.itemLink = itemLink
f.numPlayers = numPlayers or 0
f.isDone = isDone
local isExpanded = rollID and expanded[rollID]
SetToggleTexture(f.toggle, isExpanded)
-- Item icon/name/quality via the ClassicAPI Item mixin. When the item
-- isn't cached yet, show a placeholder and re-paint this row from the
-- ContinueOnItemLoad callback (guarded on rollID: rows are pooled, so the
-- callback must no-op if the row has since been reused for another roll).
local item = itemLink and Item:CreateFromItemLink(itemLink)
if item and not item:IsItemEmpty() then
if item:IsItemDataCached() then
RenderItemVisual(f, item)
else
ShowRetrieving(f)
local pending = rollID
item:ContinueOnItemLoad(function()
if f.rollID == pending then RenderItemVisual(f, item) end
end)
end
else
ShowRetrieving(f)
end
-- winner summary only on a decided, collapsed row
if isDone and not isExpanded then
if winnerIdx then
local wname, wclass, wrollType, wroll = C_LootHistory.GetPlayerInfo(i, winnerIdx)
f.winicon:SetTexture(ROLL_TEX[wrollType] or ROLL_TEX[ROLL_NEED])
f.winicon:Show()
if wroll and wroll > 0 then f.winroll:SetText(wroll) else f.winroll:SetText("") end
f.winroll:Show()
f.winname:SetText(wname or UNKNOWN)
f.winname:SetTextColor(ClassColor(wclass))
f.winname:Show()
else
-- nobody won: everyone passed
f.winicon:SetTexture(ROLL_TEX[ROLL_PASS])
f.winicon:Show()
f.winroll:SetText("")
f.winroll:Show()
f.winname:SetText(T["All players passed"])
f.winname:SetTextColor(1, .4, .4)
f.winname:Show()
end
else
f.winicon:Hide()
f.winroll:Hide()
f.winname:Hide()
end
end
local function RenderPlayerFrame(pf, name, class, rollType, roll, isWinner)
pf.name:SetText(name or UNKNOWN)
pf.name:SetTextColor(ClassColor(class))
pf.rollicon:SetTexture(ROLL_TEX[rollType] or ROLL_TEX[ROLL_PASS])
if roll and roll > 0 then pf.rolltext:SetText(roll) else pf.rolltext:SetText("") end
if isWinner then pf.winmark:Show() else pf.winmark:Hide() end
end
-- A player row is worth showing while the roll is undecided (see everyone),
-- or afterwards only if they actually rolled or it's you (hide the passers'
-- noise on a decided roll) — mirrors Blizzard's ShouldDisplayPlayer.
local function ShouldDisplayPlayer(isDone, roll, isMe)
return isMe or (roll and roll > 0) or not isDone
end
function FullUpdate()
if not pfUI.loothistory:IsShown() then return end
RecycleAllPlayers()
local num = C_LootHistory.GetNumItems()
local y = -2
for i = 1, num do
local f = itemFrames[i] or CreateItemFrame()
itemFrames[i] = f
UpdateItemFrame(f, i)
f:ClearAllPoints()
f:SetPoint("TOPLEFT", list, "TOPLEFT", 4, y)
f:Show()
y = y - ITEM_H - 2
if f.rollID and expanded[f.rollID] then
for p = 1, f.numPlayers do
local name, class, rollType, roll, isWinner, isMe = C_LootHistory.GetPlayerInfo(i, p)
if ShouldDisplayPlayer(f.isDone, roll, isMe) then
local pf = GetPlayerFrame()
RenderPlayerFrame(pf, name, class, rollType, roll, isWinner)
pf:ClearAllPoints()
pf:SetPoint("TOPLEFT", list, "TOPLEFT", 22, y)
pf:Show()
y = y - PLAYER_H
end
end
y = y - 2
end
end
for i = num + 1, table.getn(itemFrames) do
itemFrames[i]:Hide()
end
-- Resize the scroll child and re-attach it: SetHeight alone on a
-- SetAllPoints'd child doesn't make the ScrollFrame recompute its scroll
-- range, so a dynamically-grown list wouldn't scroll until a /reload.
list:SetHeight(math.max(1, -y + 2))
pfUI.loothistory.scroll:SetScrollChild(list)
pfUI.loothistory.scroll:UpdateScrollState()
end
pfUI.loothistory:SetScript("OnShow", function() FullUpdate() end)
-- ==========================================================================
-- Events
-- ==========================================================================
local events = CreateFrame("Frame")
events:RegisterEvent("LOOT_HISTORY_FULL_UPDATE")
events:RegisterEvent("LOOT_HISTORY_ROLL_CHANGED")
events:RegisterEvent("LOOT_HISTORY_ROLL_COMPLETE")
events:SetScript("OnEvent", function()
-- auto-show on a new roll opening / completing, if enabled
if C.loothistory.autoshow == "1"
and (event == "LOOT_HISTORY_FULL_UPDATE" or event == "LOOT_HISTORY_ROLL_COMPLETE")
and not pfUI.loothistory:IsShown() then
pfUI.loothistory:Show() -- OnShow runs FullUpdate
return
end
FullUpdate() -- no-op while hidden
end)
-- ==========================================================================
-- Slash command
-- ==========================================================================
local function Toggle()
pfUI.loothistory:SetShown(not pfUI.loothistory:IsShown())
end
_G.SLASH_PFLOOTHISTORY1, _G.SLASH_PFLOOTHISTORY2 = "/loothistory", "/pfloothistory"
_G.SlashCmdList.PFLOOTHISTORY = Toggle
end)
+4 -4
View File
@@ -125,13 +125,13 @@ pfUI:RegisterModule("mapcolors", function ()
-- WorldMap -- WorldMap
Initialize('WorldMap') Initialize('WorldMap')
pfUI.hooksecurefunc('WorldMapButton_OnUpdate', function() hooksecurefunc('WorldMapButton_OnUpdate', function()
if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end
UpdateUnitFrames('WorldMap') UpdateUnitFrames('WorldMap')
end) end)
if C.appearance.worldmap.colornames == "1" then if C.appearance.worldmap.colornames == "1" then
pfUI.hooksecurefunc('WorldMapUnit_OnEnter', function() hooksecurefunc('WorldMapUnit_OnEnter', function()
if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end
UpdateUnitColors('WorldMap', WorldMapTooltip) UpdateUnitColors('WorldMap', WorldMapTooltip)
end) end)
@@ -141,13 +141,13 @@ pfUI:RegisterModule("mapcolors", function ()
HookAddonOrVariable("Blizzard_BattlefieldMinimap", function() HookAddonOrVariable("Blizzard_BattlefieldMinimap", function()
Initialize('BattlefieldMinimap') Initialize('BattlefieldMinimap')
pfUI.hooksecurefunc('BattlefieldMinimap_OnUpdate', function() hooksecurefunc('BattlefieldMinimap_OnUpdate', function()
if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end
UpdateUnitFrames('BattlefieldMinimap') UpdateUnitFrames('BattlefieldMinimap')
end) end)
if C.appearance.worldmap.colornames == "1" then if C.appearance.worldmap.colornames == "1" then
pfUI.hooksecurefunc('BattlefieldMinimapUnit_OnEnter', function() hooksecurefunc('BattlefieldMinimapUnit_OnEnter', function()
if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end
UpdateUnitColors('BattlefieldMinimap', GameTooltip) UpdateUnitColors('BattlefieldMinimap', GameTooltip)
end) end)
-1
View File
@@ -1,4 +1,3 @@
pfUI:RegisterNewModule("marktracking", "Mark Tracker")
pfUI:RegisterModule("marktracking", function () pfUI:RegisterModule("marktracking", function ()
-- Requires mark1-mark8 unit tokens (Turtle WoW / Nampower) -- Requires mark1-mark8 unit tokens (Turtle WoW / Nampower)
if not UnitExists("mark1") and not UnitExists("mark8") then if not UnitExists("mark1") and not UnitExists("mark8") then
+1 -1
View File
@@ -58,7 +58,7 @@ pfUI:RegisterModule("minimap", function ()
pfUI.minimap:UpdateConfig() pfUI.minimap:UpdateConfig()
pfUI.hooksecurefunc("ToggleMinimap", function() hooksecurefunc("ToggleMinimap", function()
if pfUI.farmmap and pfUI.farmmap:IsShown() then if pfUI.farmmap and pfUI.farmmap:IsShown() then
Minimap:Hide() Minimap:Hide()
return return
+1 -1
View File
@@ -141,7 +141,7 @@ pfUI:RegisterModule("player", function ()
end end
end end
pfUI.hooksecurefunc("UnitPopup_OnClick", function() hooksecurefunc("UnitPopup_OnClick", function()
local button = this.value local button = this.value
if button == "RESET_INSTANCES_FIX" then if button == "RESET_INSTANCES_FIX" then
StaticPopup_Show("CONFIRM_RESET_INSTANCES") StaticPopup_Show("CONFIRM_RESET_INSTANCES")
+1 -1
View File
@@ -95,7 +95,7 @@ pfUI:RegisterModule("questitem", function ()
-- itemref tooltip (chat link clicks): hooksecurefunc runs after SetItemRef -- itemref tooltip (chat link clicks): hooksecurefunc runs after SetItemRef
-- populates ItemRefTooltip, so we just read the item back out of the tooltip -- populates ItemRefTooltip, so we just read the item back out of the tooltip
-- instead of re-parsing the "item:NNN" out of the link string. -- instead of re-parsing the "item:NNN" out of the link string.
pfUI.hooksecurefunc("SetItemRef", function() hooksecurefunc("SetItemRef", function()
if IsModifierKeyDown() then return end if IsModifierKeyDown() then return end
if ItemRefTooltip:HasItem() then if ItemRefTooltip:HasItem() then
local _, _, id = ItemRefTooltip:GetItem() local _, _, id = ItemRefTooltip:GetItem()
+1 -1
View File
@@ -164,7 +164,7 @@ pfUI:RegisterModule("raid", function ()
end end
end end
pfUI.hooksecurefunc("UnitPopup_OnClick", function() hooksecurefunc("UnitPopup_OnClick", function()
local dropdownFrame = UIDROPDOWNMENU_INIT_MENU and _G[UIDROPDOWNMENU_INIT_MENU] local dropdownFrame = UIDROPDOWNMENU_INIT_MENU and _G[UIDROPDOWNMENU_INIT_MENU]
if not dropdownFrame then return end if not dropdownFrame then return end
local button = this.value local button = this.value
+4 -2
View File
@@ -23,11 +23,13 @@ pfUI:RegisterModule("sellvalue", function ()
frame:AddDoubleLine(T["Buy"] .. ":", CreateGoldString(buy), 1, 1, 1) frame:AddDoubleLine(T["Buy"] .. ":", CreateGoldString(buy), 1, 1, 1)
end end
end end
elseif not MerchantFrame:IsShown() and sell > 0 then
SetTooltipMoney(frame, sell * count)
end end
frame:Show() frame:Show()
end end
pfUI.hooksecurefunc("SetItemRef", function() hooksecurefunc("SetItemRef", function()
if IsModifierKeyDown() then return end if IsModifierKeyDown() then return end
if ItemRefTooltip:HasItem() then if ItemRefTooltip:HasItem() then
local _, _, id = ItemRefTooltip:GetItem() local _, _, id = ItemRefTooltip:GetItem()
@@ -163,7 +165,7 @@ pfUI:RegisterModule("sellvalue", function ()
local function HookTooltip(tooltip) local function HookTooltip(tooltip)
for setter, entry in pairs(TooltipHooks) do for setter, entry in pairs(TooltipHooks) do
pfUI.hooksecurefunc(tooltip, setter, makeHook(entry)) hooksecurefunc(tooltip, setter, makeHook(entry))
end end
end end
+2 -2
View File
@@ -51,12 +51,12 @@ pfUI:RegisterModule("skin", function ()
DurabilityFrame.SetPoint = function() return end DurabilityFrame.SetPoint = function() return end
if C.appearance.cd.blizzard == "1" then if C.appearance.cd.blizzard == "1" then
pfUI.hooksecurefunc("PaperDollItemSlotButton_Update", function() hooksecurefunc("PaperDollItemSlotButton_Update", function()
local cooldown = _G[this:GetName().."Cooldown"] local cooldown = _G[this:GetName().."Cooldown"]
if cooldown then cooldown.pfCooldownType = "BLIZZARD" end if cooldown then cooldown.pfCooldownType = "BLIZZARD" end
end) end)
pfUI.hooksecurefunc("SpellButton_UpdateButton", function() hooksecurefunc("SpellButton_UpdateButton", function()
local cooldown = _G[this:GetName().."Cooldown"] local cooldown = _G[this:GetName().."Cooldown"]
if cooldown then cooldown.pfCooldownType = "BLIZZARD" end if cooldown then cooldown.pfCooldownType = "BLIZZARD" end
end) end)
+3 -3
View File
@@ -10,7 +10,7 @@ pfUI:RegisterModule("socialmod", function ()
end end
end) end)
do -- add colors to guild list do -- add colors to guild list
pfUI.hooksecurefunc("GuildStatus_Update", function() hooksecurefunc("GuildStatus_Update", function()
local playerzone = GetRealZoneText() local playerzone = GetRealZoneText()
local off = FauxScrollFrame_GetOffset(GuildListScrollFrame) local off = FauxScrollFrame_GetOffset(GuildListScrollFrame)
for i=1, GUILDMEMBERS_TO_DISPLAY, 1 do for i=1, GUILDMEMBERS_TO_DISPLAY, 1 do
@@ -70,7 +70,7 @@ pfUI:RegisterModule("socialmod", function ()
end end
do -- add colors to friend list do -- add colors to friend list
pfUI.hooksecurefunc("FriendsList_Update", function() hooksecurefunc("FriendsList_Update", function()
if GetNumFriends() == 0 then return end if GetNumFriends() == 0 then return end
local playerzone = GetRealZoneText() local playerzone = GetRealZoneText()
@@ -123,7 +123,7 @@ pfUI:RegisterModule("socialmod", function ()
end end
do -- add colors to who list do -- add colors to who list
pfUI.hooksecurefunc("WhoList_Update", function() hooksecurefunc("WhoList_Update", function()
local num, max = GetNumWhoResults() local num, max = GetNumWhoResults()
local off = FauxScrollFrame_GetOffset(WhoListScrollFrame) local off = FauxScrollFrame_GetOffset(WhoListScrollFrame)
+1 -2
View File
@@ -1,4 +1,3 @@
pfUI:RegisterNewModule("swingtimer", "Swing Timer")
pfUI:RegisterModule("swingtimer", function () pfUI:RegisterModule("swingtimer", function ()
local rawborder, border = GetBorderSize() local rawborder, border = GetBorderSize()
@@ -430,7 +429,7 @@ pfUI:RegisterModule("swingtimer", function ()
local kind, id = GetActionInfo(slot) local kind, id = GetActionInfo(slot)
local name local name
if kind == "spell" then if kind == "spell" then
name = GetSpellInfo(id) name = C_Spell.GetSpellName(id)
elseif kind == "macro" then elseif kind == "macro" then
name = GetMacroSpell(id) name = GetMacroSpell(id)
end end
+5 -5
View File
@@ -530,7 +530,7 @@ pfUI:RegisterModule("thirdparty-vanilla", function()
end end
-- replace wim class colors with pfUI ones -- replace wim class colors with pfUI ones
pfUI.hooksecurefunc("WIM_InitClassProps", function() hooksecurefunc("WIM_InitClassProps", function()
for class in pairs(PFUI_CLASS_COLORS) do for class in pairs(PFUI_CLASS_COLORS) do
local wimclass = _G[format("WIM_LOCALIZED_%s",class)] local wimclass = _G[format("WIM_LOCALIZED_%s",class)]
local colorstr = "|c" .. PFUI_CLASS_COLORS[class].colorStr local colorstr = "|c" .. PFUI_CLASS_COLORS[class].colorStr
@@ -547,7 +547,7 @@ pfUI:RegisterModule("thirdparty-vanilla", function()
btnClose:SetWidth(13) btnClose:SetWidth(13)
btnClose:SetHeight(13) btnClose:SetHeight(13)
end end
pfUI.hooksecurefunc("WIM_Icon_DropDown_Update", function() hooksecurefunc("WIM_Icon_DropDown_Update", function()
for i=1,_G.WIM_MaxMenuCount do for i=1,_G.WIM_MaxMenuCount do
local btn = _G["WIM_ConversationMenuTellButton"..i] local btn = _G["WIM_ConversationMenuTellButton"..i]
if i==1 and btn:IsEnabled() == 0 then return end if i==1 and btn:IsEnabled() == 0 then return end
@@ -729,7 +729,7 @@ pfUI:RegisterModule("thirdparty-vanilla", function()
SkinScrollbar(WIM_HelpScrollFrameScrollBar) SkinScrollbar(WIM_HelpScrollFrameScrollBar)
end end
pfUI.hooksecurefunc("WIM_WindowOnShow", function() hooksecurefunc("WIM_WindowOnShow", function()
if this.backdrop then return end -- already skinned if this.backdrop then return end -- already skinned
local windowname = this:GetName() local windowname = this:GetName()
@@ -904,7 +904,7 @@ pfUI:RegisterModule("thirdparty-vanilla", function()
end end
-- trigger the event whenever SuperMacro got an update -- trigger the event whenever SuperMacro got an update
pfUI.hooksecurefunc("SM_UpdateActionSpell", function() hooksecurefunc("SM_UpdateActionSpell", function()
for slot=1,120 do pfUI.bars.update[slot] = true end for slot=1,120 do pfUI.bars.update[slot] = true end
end) end)
end) end)
@@ -922,7 +922,7 @@ pfUI:RegisterModule("thirdparty-vanilla", function()
pfUI.bars.skip_macro = true pfUI.bars.skip_macro = true
-- send clevermacro events to pfUI actionbars -- send clevermacro events to pfUI actionbars
pfUI.hooksecurefunc("ActionButton_OnEvent", function(event) hooksecurefunc("ActionButton_OnEvent", function(event)
events(this, event) events(this, event)
end) end)
end) end)
+42 -24
View File
@@ -65,14 +65,14 @@ pfUI:RegisterModule("turtle-wow", function ()
HookAddonOrVariable("GroupFrame", function() HookAddonOrVariable("GroupFrame", function()
-- After Turtle's own init, hide frames if pfUI handles them -- After Turtle's own init, hide frames if pfUI handles them
pfUI.hooksecurefunc("GroupFrame_Toggle", function() hooksecurefunc("GroupFrame_Toggle", function()
if pfUIHandlesGroupOrRaid() then if pfUIHandlesGroupOrRaid() then
DisableTurtleGroupFrames() DisableTurtleGroupFrames()
end end
end) end)
-- After every group/raid update, re-hide if pfUI handles them -- After every group/raid update, re-hide if pfUI handles them
pfUI.hooksecurefunc("GroupFrame_Update", function() hooksecurefunc("GroupFrame_Update", function()
if pfUIHandlesGroupOrRaid() then if pfUIHandlesGroupOrRaid() then
DisableTurtleGroupFrames() DisableTurtleGroupFrames()
end end
@@ -295,40 +295,58 @@ pfUI:RegisterModule("turtle-wow", function ()
local initialized = false local initialized = false
HookAddonOrVariable("Blizzard_InspectUI", function() HookAddonOrVariable("Blizzard_InspectUI", function()
pfUI.hooksecurefunc("InspectFrame_Show", function() hooksecurefunc("InspectFrame_Show", function()
-- break if theres nothing left to do -- break if theres nothing left to do
if initialized then return end if initialized then return end
-- adjust ui positions local _, border = GetBorderSize()
-- adjust the inspect frame's Talents tab
SkinTab(InspectFrameTab3) SkinTab(InspectFrameTab3)
InspectFrameTab3:ClearAllPoints() InspectFrameTab3:ClearAllPoints()
InspectFrameTab3:SetPoint("LEFT", InspectFrameTab2, "RIGHT", GetBorderSize()*2 + 1, 0) InspectFrameTab3:SetPoint("LEFT", InspectFrameTab2, "RIGHT", border*2 + 1, 0)
TWTalentFrameTab1:SetPoint("TOPLEFT", TWTalentFrameScrollFrame, "TOPLEFT", 2, TWTalentFrameTab1:GetHeight() + 4)
-- reload text position -- reload text position
InspectFrameTab3:Hide() InspectFrameTab3:Hide()
InspectFrameTab3:Show() InspectFrameTab3:Show()
-- skin inspect window elements -- the talent tree frame is created lazily; skin it once it exists
StripTextures(InspectTalentsFrame) if TWTalentFrame then
StripTextures(TWTalentFrameScrollFrame) StripTextures(InspectTalentsFrame)
SkinScrollbar(TWTalentFrameScrollFrameScrollBar) StripTextures(TWTalentFrame)
for i = 1, 3 do StripTextures(TWTalentFrameScrollFrame)
SkinTab(_G["TWTalentFrameTab"..i]) SkinScrollbar(TWTalentFrameScrollFrameScrollBar)
end
-- skin each talent button -- skin + position the talent-tree tabs
for i = 1, (MAX_NUM_TALENTS or 100) do for i = 1, 3 do
local talent = _G["TWTalentFrameTalent" .. i] local tab = _G["TWTalentFrameTab"..i]
if talent then if tab then
StripTextures(talent) SkinTab(tab)
SkinButton(talent, nil, nil, nil, _G["TWTalentFrameTalent" .. i .. "IconTexture"]) tab:ClearAllPoints()
_G["TWTalentFrameTalent" .. i .. "Rank"]:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE") local lastTab = _G["TWTalentFrameTab"..(i-1)]
if lastTab then
tab:SetPoint("LEFT", lastTab, "RIGHT", border*2 + 1, 0)
else
tab:SetPoint("TOPLEFT", TWTalentFrameScrollFrame, "TOPLEFT", 2, tab:GetHeight() + 4)
end
end
end end
end
-- only run once -- skin each talent button
initialized = true for i = 1, (MAX_NUM_TALENTS or 100) do
local talent = _G["TWTalentFrameTalent"..i]
if talent then
StripTextures(talent)
SkinButton(talent, nil, nil, nil, _G["TWTalentFrameTalent"..i.."IconTexture"])
local rank = _G["TWTalentFrameTalent"..i.."Rank"]
if rank then
rank:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
end
end
end
-- only run once the talent frame has actually been skinned
initialized = true
end
end) end)
end) end)
end end
+10 -25
View File
@@ -4,8 +4,6 @@ pfUI:RegisterModule("unusable", function ()
pfUI.unusable = {} pfUI.unusable = {}
local scanner = libtipscan:GetScanner("unusable")
local durability = string.gsub(DURABILITY_TEMPLATE, "%%[^%s]+", "(.+)")
local r, g, b, a = strsplit(",", C.appearance.bags.unusable_color) local r, g, b, a = strsplit(",", C.appearance.bags.unusable_color)
function pfUI.unusable:UpdateSlot(bag, slot) function pfUI.unusable:UpdateSlot(bag, slot)
@@ -13,40 +11,27 @@ pfUI:RegisterModule("unusable", function ()
if not pfUI.bags[bag] then return end if not pfUI.bags[bag] then return end
if not pfUI.bags[bag].slots[slot] then return end if not pfUI.bags[bag].slots[slot] then return end
-- add button shortcuts
local frame = pfUI.bags[bag].slots[slot].frame
local name = frame:GetName()
-- return on empty buttons -- return on empty buttons
local frame = pfUI.bags[bag].slots[slot].frame
if not frame.hasItem then return end if not frame.hasItem then return end
-- set the proper tooltip method -- C_PlayerInfo.CanUseItem is the "is this red in the tooltip" gate:
if bag == BANK_CONTAINER then -- proficiency, required level, class/race, skill/spell/rep. It checks
scanner:SetInventoryItem("player", 39+slot) -- *requirements* only, so a broken (0-durability) item still reads as
else -- usable -- no durability-line exclusion needed like the old scanner.
scanner:SetBagItem(bag, slot) local itemID = C_Container.GetContainerItemID(bag, slot)
if itemID and not C_PlayerInfo.CanUseItem(itemID) then
_G.SetItemButtonTextureVertexColor(frame, r, g, b, a)
end end
-- check for red color in tooltip
local red = scanner:Color(RED_FONT_COLOR)
if not red then return end
-- check for broken items
local left = scanner:Line(red)
local _, _, broken = string.find(left, durability, 1)
if broken then return end
-- update button vertex color
_G.SetItemButtonTextureVertexColor(frame, r, g, b, a)
end end
-- update on regular pfUI button updates -- update on regular pfUI button updates
pfUI.hooksecurefunc(pfUI.bag, "UpdateSlot", function(self, bag, slot) hooksecurefunc(pfUI.bag, "UpdateSlot", function(self, bag, slot)
pfUI.unusable:UpdateSlot(bag, slot) pfUI.unusable:UpdateSlot(bag, slot)
end) end)
-- update on bank frame itemlock updates -- update on bank frame itemlock updates
pfUI.hooksecurefunc("BankFrameItemButton_UpdateLock", function() hooksecurefunc("BankFrameItemButton_UpdateLock", function()
pfUI.unusable:UpdateSlot(-1, this:GetID()) pfUI.unusable:UpdateSlot(-1, this:GetID())
end) end)
end) end)
+1 -1
View File
@@ -27,7 +27,7 @@ do
-- ClassicAPI dependency check. -- ClassicAPI dependency check.
-- pfUI relies pervasively on the modern C_* / SuperWoW / nameplate / focus -- pfUI relies pervasively on the modern C_* / SuperWoW / nameplate / focus
-- API surface that ClassicAPI polyfills, so presence is required. -- API surface that ClassicAPI polyfills, so presence is required.
local PFUI_CLASSIC_API_MIN = 10600 -- (X*10000 + Y*100 + Z) local PFUI_CLASSIC_API_MIN = 10605 -- (X*10000 + Y*100 + Z)
local PFUI_CLASSIC_API_LATEST = PFUI_CLASSIC_API_MIN local PFUI_CLASSIC_API_LATEST = PFUI_CLASSIC_API_MIN
local PFUI_CLASSIC_API_WEBSITE = "https://github.com/brues-code/ClassicAPI" local PFUI_CLASSIC_API_WEBSITE = "https://github.com/brues-code/ClassicAPI"
local PFUI_CLASSIC_API_LATEST_URL = PFUI_CLASSIC_API_WEBSITE .. "/releases/latest" local PFUI_CLASSIC_API_LATEST_URL = PFUI_CLASSIC_API_WEBSITE .. "/releases/latest"
+5 -5
View File
@@ -12,7 +12,7 @@ pfUI:RegisterSkin("Auctionhouse", function ()
SkinArrowButton(AuctionsNextPageButton, "right", 18) SkinArrowButton(AuctionsNextPageButton, "right", 18)
end end
pfUI.hooksecurefunc("AuctionFrame_OnShow", function() hooksecurefunc("AuctionFrame_OnShow", function()
AuctionFrame:ClearAllPoints() AuctionFrame:ClearAllPoints()
AuctionFrame:SetPoint("TOPLEFT", 10, -104) AuctionFrame:SetPoint("TOPLEFT", 10, -104)
end) end)
@@ -76,7 +76,7 @@ pfUI:RegisterSkin("Auctionhouse", function ()
item:SetPoint("LEFT", 2, 0) item:SetPoint("LEFT", 2, 0)
end end
end end
pfUI.hooksecurefunc("AuctionFrameBrowse_Update", function() hooksecurefunc("AuctionFrameBrowse_Update", function()
for i = 1, NUM_BROWSE_TO_DISPLAY do for i = 1, NUM_BROWSE_TO_DISPLAY do
HandleIcon(_G["BrowseButton"..i.."Item"], _G["BrowseButton"..i.."ItemIconTexture"]) HandleIcon(_G["BrowseButton"..i.."Item"], _G["BrowseButton"..i.."ItemIconTexture"])
end end
@@ -145,7 +145,7 @@ pfUI:RegisterSkin("Auctionhouse", function ()
item:ClearAllPoints() item:ClearAllPoints()
item:SetPoint("LEFT", 2, 0) item:SetPoint("LEFT", 2, 0)
end end
pfUI.hooksecurefunc("AuctionFrameBid_Update", function() hooksecurefunc("AuctionFrameBid_Update", function()
for i = 1, NUM_BIDS_TO_DISPLAY do for i = 1, NUM_BIDS_TO_DISPLAY do
HandleIcon(_G["BidButton"..i.."Item"], _G["BidButton"..i.."ItemIconTexture"]) HandleIcon(_G["BidButton"..i.."Item"], _G["BidButton"..i.."ItemIconTexture"])
end end
@@ -191,14 +191,14 @@ pfUI:RegisterSkin("Auctionhouse", function ()
item:ClearAllPoints() item:ClearAllPoints()
item:SetPoint("LEFT", 2, 0) item:SetPoint("LEFT", 2, 0)
end end
pfUI.hooksecurefunc("AuctionFrameAuctions_Update", function() hooksecurefunc("AuctionFrameAuctions_Update", function()
for i = 1, NUM_AUCTIONS_TO_DISPLAY do for i = 1, NUM_AUCTIONS_TO_DISPLAY do
HandleIcon(_G["AuctionsButton"..i.."Item"], _G["AuctionsButton"..i.."ItemIconTexture"]) HandleIcon(_G["AuctionsButton"..i.."Item"], _G["AuctionsButton"..i.."ItemIconTexture"])
end end
end) end)
SkinButton(AuctionsItemButton) SkinButton(AuctionsItemButton)
pfUI.hooksecurefunc("AuctionSellItemButton_OnEvent", function() hooksecurefunc("AuctionSellItemButton_OnEvent", function()
if event ~= "NEW_AUCTION_UPDATE" then return end if event ~= "NEW_AUCTION_UPDATE" then return end
HandleIcon(AuctionsItemButton, AuctionsItemButton:GetNormalTexture()) HandleIcon(AuctionsItemButton, AuctionsItemButton:GetNormalTexture())
end) end)
+1 -1
View File
@@ -19,7 +19,7 @@ pfUI:RegisterSkin("Battlefield Minimap", function ()
BattlefieldMinimapTab:Hide() BattlefieldMinimapTab:Hide()
end) end)
pfUI.hooksecurefunc("BattlefieldMinimap_ShowOpacity", function() hooksecurefunc("BattlefieldMinimap_ShowOpacity", function()
OpacityFrame:ClearAllPoints() OpacityFrame:ClearAllPoints()
OpacityFrame:SetPoint("TOPRIGHT", "BattlefieldMinimap", "TOPLEFT", -2*border, 0) OpacityFrame:SetPoint("TOPRIGHT", "BattlefieldMinimap", "TOPLEFT", -2*border, 0)
end) end)
+4 -4
View File
@@ -136,18 +136,18 @@ pfUI:RegisterSkin("Character", function ()
end end
end end
pfUI.hooksecurefunc("CharacterFrame_OnShow", function() hooksecurefunc("CharacterFrame_OnShow", function()
RefreshCharacterSlots() RefreshCharacterSlots()
RefreshPetPosition() RefreshPetPosition()
end) end)
pfUI.hooksecurefunc("PaperDollItemSlotButton_Update", function() hooksecurefunc("PaperDollItemSlotButton_Update", function()
if this:GetParent() == PaperDollFrame then if this:GetParent() == PaperDollFrame then
RefreshCharacterSlot(this) RefreshCharacterSlot(this)
end end
end) end)
pfUI.hooksecurefunc("PetTab_Update", RefreshPetPosition) hooksecurefunc("PetTab_Update", RefreshPetPosition)
StripTextures(PaperDollFrame) StripTextures(PaperDollFrame)
StripTextures(CharacterAttributesFrame) StripTextures(CharacterAttributesFrame)
@@ -270,7 +270,7 @@ pfUI:RegisterSkin("Character", function ()
-- the FactionStanding text from `bar.standingText` on mouseout, so we -- the FactionStanding text from `bar.standingText` on mouseout, so we
-- stash our augmented text there too — otherwise hovering a bar strips -- stash our augmented text there too — otherwise hovering a bar strips
-- the "(N)" suffix off. -- the "(N)" suffix off.
pfUI.hooksecurefunc("ReputationFrame_Update", function() hooksecurefunc("ReputationFrame_Update", function()
if C.character.reputation.repRequired ~= "1" then return end if C.character.reputation.repRequired ~= "1" then return end
local offset = FauxScrollFrame_GetOffset(ReputationListScrollFrame) local offset = FauxScrollFrame_GetOffset(ReputationListScrollFrame)
for i = 1, NUM_FACTIONS_DISPLAYED do for i = 1, NUM_FACTIONS_DISPLAYED do
+2 -2
View File
@@ -150,7 +150,7 @@ pfUI:RegisterSkin("Friends", function ()
end end
-- set positions -- set positions
pfUI.hooksecurefunc("WhoList_Update", function() hooksecurefunc("WhoList_Update", function()
for i = 1, WHOS_TO_DISPLAY do for i = 1, WHOS_TO_DISPLAY do
local level = _G["WhoFrameButton"..i.."Level"] local level = _G["WhoFrameButton"..i.."Level"]
level:ClearAllPoints() level:ClearAllPoints()
@@ -231,7 +231,7 @@ pfUI:RegisterSkin("Friends", function ()
end end
-- set positions -- set positions
pfUI.hooksecurefunc("GuildStatus_Update", function() hooksecurefunc("GuildStatus_Update", function()
for i = 1, GUILDMEMBERS_TO_DISPLAY do for i = 1, GUILDMEMBERS_TO_DISPLAY do
local level = _G["GuildFrameButton"..i.."Level"] local level = _G["GuildFrameButton"..i.."Level"]
level:ClearAllPoints() level:ClearAllPoints()
+2 -2
View File
@@ -24,11 +24,11 @@ pfUI:RegisterSkin("Gossip and Quest", function ()
QuestRewardItemHighlightBG:SetTexture(1,1,1,.2) QuestRewardItemHighlightBG:SetTexture(1,1,1,.2)
QuestRewardItemHighlightBG:SetAllPoints() QuestRewardItemHighlightBG:SetAllPoints()
pfUI.hooksecurefunc("QuestFrameItems_Update", function() hooksecurefunc("QuestFrameItems_Update", function()
QuestRewardItemHighlight:Hide() QuestRewardItemHighlight:Hide()
end) end)
pfUI.hooksecurefunc("QuestRewardItem_OnClick", function() hooksecurefunc("QuestRewardItem_OnClick", function()
if this.type == "choice" then if this.type == "choice" then
QuestRewardItemHighlight:SetAllPoints(this.backdrop) QuestRewardItemHighlight:SetAllPoints(this.backdrop)
QuestRewardItemHighlight:Show() QuestRewardItemHighlight:Show()
+185
View File
@@ -0,0 +1,185 @@
local slots = {
"HeadSlot",
"NeckSlot",
"ShoulderSlot",
"BackSlot",
"ChestSlot",
"ShirtSlot",
"TabardSlot",
"WristSlot",
"HandsSlot",
"WaistSlot",
"LegsSlot",
"FeetSlot",
"Finger0Slot",
"Finger1Slot",
"Trinket0Slot",
"Trinket1Slot",
"MainHandSlot",
"SecondaryHandSlot",
"RangedSlot",
}
pfUI:RegisterSkin("Inspect", function ()
local rawborder, border = GetBorderSize()
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
HookAddonOrVariable("Blizzard_InspectUI", function()
local cache = {}
CreateBackdrop(InspectFrame, nil, nil, .75)
CreateBackdropShadow(InspectFrame)
InspectFrame.backdrop:SetPoint("TOPLEFT", 10, -10)
InspectFrame.backdrop:SetPoint("BOTTOMRIGHT", -30, 72)
InspectFrame:SetHitRectInsets(10,30,10,72)
EnableMovable("InspectFrame", "Blizzard_InspectUI", INSPECTFRAME_SUBFRAMES)
SkinCloseButton(InspectFrameCloseButton, InspectFrame.backdrop, -6, -6)
InspectFrame:DisableDrawLayer("ARTWORK")
InspectNameText:ClearAllPoints()
InspectNameText:SetPoint("TOP", InspectFrame.backdrop, "TOP", 0, -10)
-- Turtle WoW has up to 4 inspect tabs: Character, Honor, Arena, Talents
for i = 1, 4 do
local tab = _G["InspectFrameTab"..i]
if tab then
local lastTab = _G["InspectFrameTab"..(i-1)]
tab:ClearAllPoints()
if lastTab then
tab:SetPoint("LEFT", lastTab, "RIGHT", border*2 + 1, 0)
else
tab:SetPoint("TOPLEFT", InspectFrame.backdrop, "BOTTOMLEFT", bpad, -(border + (border == 1 and 1 or 2)))
end
SkinTab(tab)
end
end
do -- Character Tab
StripTextures(InspectPaperDollFrame)
EnableClickRotate(InspectModelFrame)
local rotL = InspectModelRotateLeftButton or InspectModelFrameRotateLeftButton
if rotL then rotL:Hide() end
local rotR = InspectModelRotateRightButton or InspectModelFrameRotateRightButton
if rotR then rotR:Hide() end
for _, slot in pairs(slots) do
local frame = _G["Inspect"..slot]
StripTextures(frame)
CreateBackdrop(frame)
SetAllPointsOffset(frame.backdrop, frame, 0)
HandleIcon(frame.backdrop, _G["Inspect"..slot.."IconTexture"])
local funce = frame:GetScript("OnEnter")
frame:SetScript("OnEnter", function()
local bid = this:GetID()
if not GetInventoryItemLink(InspectFrame.unit, this:GetID()) and this.hasItem then
GameTooltip:SetOwner(this, "ANCHOR_TOPRIGHT")
GameTooltip:SetHyperlink("item:"..cache[bid]["id"])
GameTooltip:Show()
else
funce()
end
end)
end
local function ColorSlot(slot, id, itemID, vslot)
local item = Item:CreateFromItemID(itemID)
if item:IsItemEmpty() then return end
item:ContinueOnItemLoad(function()
if not InspectFrame.unit then return end
if GetInventoryItemID(InspectFrame.unit, id) ~= itemID then return end
local quality = item:GetItemQuality()
if not quality then return end
local r, g, b = GetItemQualityColor(quality)
slot.backdrop:SetBackdropBorderColor(r, g, b)
if ShaguScore then
if not slot.scoreText then
slot.scoreText = slot:CreateFontString(nil, "OVERLAY", "GameFontNormal")
slot.scoreText:SetFont(pfUI.font_default, 12, "OUTLINE")
slot.scoreText:SetPoint("TOPRIGHT", 0, 0)
end
local itemLevel = ShaguScore.Database[itemID] or 0
local score = ShaguScore:Calculate(vslot, quality, itemLevel)
if score and score > 0 then
slot.scoreText:SetText(score)
slot.scoreText:SetTextColor(r, g, b)
else
slot.scoreText:SetText("")
end
end
end)
end
local function UpdateSlots()
if not InspectFrame.unit then return end
local guild, title = GetGuildInfo(InspectFrame.unit)
if guild then
InspectGuildText:SetPoint("TOP", InspectLevelText, "BOTTOM", 0, -1)
InspectGuildText:SetText(format(TEXT(GUILD_TITLE_TEMPLATE), title, guild))
InspectGuildText:Show()
else
InspectGuildText:SetText("")
InspectGuildText:Hide()
end
for _, vslot in pairs(slots) do
local id = GetInventorySlotInfo(vslot)
local itemID = GetInventoryItemID(InspectFrame.unit, id)
local slot = _G["Inspect" .. vslot]
if itemID then
ColorSlot(slot, id, itemID, vslot)
elseif not slot.hasItem then
-- genuinely empty slot: reset to a plain backdrop
CreateBackdrop(slot)
SetAllPointsOffset(slot.backdrop, slot, 0)
if slot.scoreText then
slot.scoreText:SetText("")
end
end
end
end
hooksecurefunc("InspectPaperDollItemSlotButton_Update", function(button)
local bid = button:GetID()
local itemID = GetInventoryItemID(InspectFrame.unit, bid)
if itemID then
cache[bid] = cache[bid] or {}
cache[bid]["id"] = itemID
cache[bid]["tex"] = GetInventoryItemTexture(InspectFrame.unit, button:GetID())
cache[bid]["count"] = GetInventoryItemCount(InspectFrame.unit, button:GetID())
cache[bid]["name"] = UnitName(InspectFrame.unit)
elseif cache[bid] and UnitName(InspectFrame.unit) == cache[bid].name then
-- restore cache information
SetItemButtonTexture(button, cache[bid]["tex"])
SetItemButtonCount(button, cache[bid]["count"])
button.hasItem = 1
end
UpdateSlots()
end)
end
do -- Honor Tab
StripTextures(InspectHonorFrame)
CreateBackdrop(InspectHonorFrameProgressBar)
InspectHonorFrameProgressBar:SetStatusBarTexture(pfUI.media["img:bar"])
InspectHonorFrameProgressBar:SetHeight(24)
end
-- NOTE: Turtle WoW's Talent tab (InspectTalentsFrame / TWTalentFrame) is
-- skinned in modules/turtle-wow.lua, which activates once this skin is
-- registered (it gates on pfUI.skin["Inspect"]).
end)
end)
+2 -2
View File
@@ -12,7 +12,7 @@ pfUI:RegisterSkin("Mailbox", function ()
StripTextures(SendMailPackageButton) StripTextures(SendMailPackageButton)
SkinButton(SendMailPackageButton, nil, nil, nil, nil, true) SkinButton(SendMailPackageButton, nil, nil, nil, nil, true)
pfUI.hooksecurefunc("SendMailFrame_Update", function() hooksecurefunc("SendMailFrame_Update", function()
HandleIcon(SendMailPackageButton, SendMailPackageButton:GetNormalTexture()) HandleIcon(SendMailPackageButton, SendMailPackageButton:GetNormalTexture())
local _, itemID = GetSendMailItemLink() local _, itemID = GetSendMailItemLink()
@@ -62,7 +62,7 @@ pfUI:RegisterSkin("Mailbox", function ()
do -- OpenMailFrame do -- OpenMailFrame
SkinButton(OpenMailPackageButton, nil, nil, nil, OpenMailPackageButtonIconTexture) SkinButton(OpenMailPackageButton, nil, nil, nil, OpenMailPackageButtonIconTexture)
pfUI.hooksecurefunc("InboxFrame_OnClick", function(index) hooksecurefunc("InboxFrame_OnClick", function(index)
local _, itemID = GetInboxItemLink(index) local _, itemID = GetInboxItemLink(index)
if itemID then if itemID then
local quality = C_Item.GetItemQualityByID(itemID) local quality = C_Item.GetItemQualityByID(itemID)
+2 -2
View File
@@ -6,7 +6,7 @@ pfUI:RegisterSkin("Merchant", function ()
if MerchantGuildBankRepairButton then -- tbc if MerchantGuildBankRepairButton then -- tbc
SkinButton(MerchantGuildBankRepairButton, nil, nil, nil, MerchantGuildBankRepairButtonIcon) SkinButton(MerchantGuildBankRepairButton, nil, nil, nil, MerchantGuildBankRepairButtonIcon)
MerchantGuildBankRepairButtonIcon:SetTexCoord(.59, .82, .06, .54) MerchantGuildBankRepairButtonIcon:SetTexCoord(.59, .82, .06, .54)
pfUI.hooksecurefunc("MerchantFrame_UpdateRepairButtons", function() hooksecurefunc("MerchantFrame_UpdateRepairButtons", function()
MerchantGuildBankRepairButton:ClearAllPoints() MerchantGuildBankRepairButton:ClearAllPoints()
MerchantGuildBankRepairButton:SetPoint("RIGHT", MerchantBuyBackItemItemButton, "LEFT", -14, 0) MerchantGuildBankRepairButton:SetPoint("RIGHT", MerchantBuyBackItemItemButton, "LEFT", -14, 0)
MerchantRepairAllButton:ClearAllPoints() MerchantRepairAllButton:ClearAllPoints()
@@ -56,7 +56,7 @@ pfUI:RegisterSkin("Merchant", function ()
moneyFrame:SetPoint("BOTTOMLEFT", itemButton, "BOTTOMRIGHT", 5, 1) moneyFrame:SetPoint("BOTTOMLEFT", itemButton, "BOTTOMRIGHT", 5, 1)
end end
pfUI.hooksecurefunc("MerchantFrame_UpdateMerchantInfo", function() hooksecurefunc("MerchantFrame_UpdateMerchantInfo", function()
if MerchantFrame.selectedTab == 1 then if MerchantFrame.selectedTab == 1 then
for i = 3, 11, 2 do for i = 3, 11, 2 do
_G["MerchantItem"..i]:ClearAllPoints() _G["MerchantItem"..i]:ClearAllPoints()
+1 -1
View File
@@ -184,7 +184,7 @@ pfUI:RegisterSkin("Options - New", function ()
end end
-- hook after category selection: UpdateOptions is local so we hook its caller -- hook after category selection: UpdateOptions is local so we hook its caller
pfUI.hooksecurefunc("OptionsListButton_OnClick", SkinControls) hooksecurefunc("OptionsListButton_OnClick", SkinControls)
-- also cover initial load -- also cover initial load
OptionsFrame:HookScript("OnShow", SkinControls) OptionsFrame:HookScript("OnShow", SkinControls)
end) end)
+10 -29
View File
@@ -5,37 +5,18 @@ pfUI:RegisterSkin("Options - Sound", function ()
-- Compatibility -- Compatibility
local SoundOptionsFrameHeaderText, NUM_CHECKBOXES, NUM_SLIDERS local SoundOptionsFrameHeaderText, NUM_CHECKBOXES, NUM_SLIDERS
if SOUND_OPTIONS then -- tbc
SoundOptionsFrameHeaderText = GetNoNameObject(SoundOptionsFrame, "FontString", "BACKGROUND", SOUND_OPTIONS)
NUM_CHECKBOXES = 11
NUM_SLIDERS = 6
StripTextures(AudioOptionsFrame) SoundOptionsFrameHeaderText = GetNoNameObject(SoundOptionsFrame, "FontString", "ARTWORK", SOUNDOPTIONS_MENU)
CreateBackdrop(SoundOptionsFramePlayback, nil, true, .75) NUM_CHECKBOXES = 8
CreateBackdrop(SoundOptionsFrameHardware, nil, true, .75) NUM_SLIDERS = 4
CreateBackdrop(SoundOptionsFrameVolume, nil, true, .75)
SkinDropDown(SoundOptionsOutputDropDown) SoundOptionsFrameOkay:ClearAllPoints()
SoundOptionsFrameOkay:SetPoint("RIGHT", SoundOptionsFrameCancel, "LEFT", -2*bpad, 0)
SoundOptionsFrameDefaults:ClearAllPoints() SoundOptionsFrameSlider1:ClearAllPoints()
SoundOptionsFrameDefaults:SetPoint("TOPLEFT", SoundOptionsFramePlayback, "BOTTOMLEFT", 0, -10) SoundOptionsFrameSlider1:SetPoint("TOPRIGHT", SoundOptionsFrame, "TOPRIGHT", -18, -43)
SoundOptionsFrameCancel:ClearAllPoints() for i=2, NUM_SLIDERS do
SoundOptionsFrameCancel:SetPoint("TOPRIGHT", SoundOptionsFrameVolume, "BOTTOMRIGHT", 0, -10) _G["SoundOptionsFrameSlider"..i]:ClearAllPoints()
SoundOptionsFrameOkay:ClearAllPoints() _G["SoundOptionsFrameSlider"..i]:SetPoint("TOP", _G["SoundOptionsFrameSlider"..i-1], "BOTTOM", 0, -30)
SoundOptionsFrameOkay:SetPoint("RIGHT", SoundOptionsFrameCancel, "LEFT", -2*bpad, 0)
else -- vanilla
SoundOptionsFrameHeaderText = GetNoNameObject(SoundOptionsFrame, "FontString", "ARTWORK", SOUNDOPTIONS_MENU)
NUM_CHECKBOXES = 8
NUM_SLIDERS = 4
SoundOptionsFrameOkay:ClearAllPoints()
SoundOptionsFrameOkay:SetPoint("RIGHT", SoundOptionsFrameCancel, "LEFT", -2*bpad, 0)
SoundOptionsFrameSlider1:ClearAllPoints()
SoundOptionsFrameSlider1:SetPoint("TOPRIGHT", SoundOptionsFrame, "TOPRIGHT", -18, -43)
for i=2, NUM_SLIDERS do
_G["SoundOptionsFrameSlider"..i]:ClearAllPoints()
_G["SoundOptionsFrameSlider"..i]:SetPoint("TOP", _G["SoundOptionsFrameSlider"..i-1], "BOTTOM", 0, -30)
end
end end
StripTextures(SoundOptionsFrame) StripTextures(SoundOptionsFrame)
+1 -1
View File
@@ -19,7 +19,7 @@ pfUI:RegisterSkin("Options - Video", function ()
slider:SetPoint(point, anchor, anchorPoint, x, y - shift) slider:SetPoint(point, anchor, anchorPoint, x, y - shift)
end end
pfUI.hooksecurefunc("OptionsFrame_Load", function() hooksecurefunc("OptionsFrame_Load", function()
OptionsFramePixelShaders:SetWidth(230) OptionsFramePixelShaders:SetWidth(230)
OptionsFrameMiscellaneous:ClearAllPoints() OptionsFrameMiscellaneous:ClearAllPoints()
OptionsFrameMiscellaneous:SetPoint("LEFT", OptionsFramePixelShaders, "RIGHT", 6, 0) OptionsFrameMiscellaneous:SetPoint("LEFT", OptionsFramePixelShaders, "RIGHT", 6, 0)
+1 -1
View File
@@ -192,7 +192,7 @@ pfUI:RegisterSkin("Profession", function ()
reagentlabel:SetTextColor(1,1,1,1) reagentlabel:SetTextColor(1,1,1,1)
local scanner = libtipscan:GetScanner(name) local scanner = libtipscan:GetScanner(name)
pfUI.hooksecurefunc(SetSelection, function(id) hooksecurefunc(SetSelection, function(id)
if id and id ~= 0 then if id and id ~= 0 then
detailscroll:Show() detailscroll:Show()
HandleIcon(icon, icon:GetNormalTexture()) HandleIcon(icon, icon:GetNormalTexture())
+3 -3
View File
@@ -13,7 +13,7 @@ pfUI:RegisterSkin("Quest Log", function ()
StripTextures(QUEST_COUNT) StripTextures(QUEST_COUNT)
QUEST_COUNT:ClearAllPoints() QUEST_COUNT:ClearAllPoints()
pfUI.hooksecurefunc("QuestLogUpdateQuestCount", function(numQuests) hooksecurefunc("QuestLogUpdateQuestCount", function(numQuests)
QUEST_COUNT:ClearAllPoints() QUEST_COUNT:ClearAllPoints()
QUEST_COUNT:SetPoint("BOTTOMRIGHT", QuestLogFrame, "TOPRIGHT", 0, -50) QUEST_COUNT:SetPoint("BOTTOMRIGHT", QuestLogFrame, "TOPRIGHT", 0, -50)
end) end)
@@ -24,7 +24,7 @@ pfUI:RegisterSkin("Quest Log", function ()
QUEST_COUNT:SetPoint("TOPRIGHT", -10, -30) QUEST_COUNT:SetPoint("TOPRIGHT", -10, -30)
end end
pfUI.hooksecurefunc("QuestLog_OnShow", function() hooksecurefunc("QuestLog_OnShow", function()
QuestLogFrame:ClearAllPoints() QuestLogFrame:ClearAllPoints()
QuestLogFrame:SetPoint("TOPLEFT", 10, -104) QuestLogFrame:SetPoint("TOPLEFT", 10, -104)
end) end)
@@ -163,7 +163,7 @@ pfUI:RegisterSkin("Quest Log", function ()
QuestLogListScrollFrame:SetPoint("TOPLEFT", 10, -54) QuestLogListScrollFrame:SetPoint("TOPLEFT", 10, -54)
QuestLogListScrollFrame:SetHeight(350) QuestLogListScrollFrame:SetHeight(350)
pfUI.hooksecurefunc("QuestLog_Update", function() hooksecurefunc("QuestLog_Update", function()
local numEntries = GetNumQuestLogEntries() local numEntries = GetNumQuestLogEntries()
local questIndex, text, level, questTag, isHeader local questIndex, text, level, questTag, isHeader
+2 -2
View File
@@ -38,12 +38,12 @@ pfUI:RegisterSkin("Readycheck", function ()
frame.bar.text:SetPoint("CENTER", 0, 0) frame.bar.text:SetPoint("CENTER", 0, 0)
local max local max
pfUI.hooksecurefunc("ShowReadyCheck", function() hooksecurefunc("ShowReadyCheck", function()
max = ReadyCheckFrame.timer max = ReadyCheckFrame.timer
frame.bar:SetMinMaxValues(0, max) frame.bar:SetMinMaxValues(0, max)
end) end)
pfUI.hooksecurefunc(update_func, function() hooksecurefunc(update_func, function()
if not ReadyCheckFrame.timer then return end if not ReadyCheckFrame.timer then return end
local perc = ReadyCheckFrame.timer/max local perc = ReadyCheckFrame.timer/max
+1 -1
View File
@@ -32,7 +32,7 @@ pfUI:RegisterSkin("GM Survey", function ()
CreateBackdrop(GMSurveyCommentFrame, nil, true, .75) CreateBackdrop(GMSurveyCommentFrame, nil, true, .75)
SkinScrollbar(GMSurveyCommentScrollFrameScrollBar) SkinScrollbar(GMSurveyCommentScrollFrameScrollBar)
GMSurveyFrameComment:SetMaxLetters(2000) GMSurveyFrameComment:SetMaxLetters(2000)
pfUI.hooksecurefunc("GMSurveyFrame_Update", function() hooksecurefunc("GMSurveyFrame_Update", function()
GMSurveyFrameComment:SetWidth(505) GMSurveyFrameComment:SetWidth(505)
end) end)
end) end)
+1 -1
View File
@@ -41,7 +41,7 @@ pfUI:RegisterSkin("Trade", function ()
RecipientButtonBG:SetAllPoints() RecipientButtonBG:SetAllPoints()
end end
pfUI.hooksecurefunc("TradeFrame_UpdateTargetItem", function(id) hooksecurefunc("TradeFrame_UpdateTargetItem", function(id)
HandleIcon(_G["TradeRecipientItem"..id.."ItemButton"], _G["TradeRecipientItem"..id..'IconTexture']) HandleIcon(_G["TradeRecipientItem"..id.."ItemButton"], _G["TradeRecipientItem"..id..'IconTexture'])
end) end)
+1 -1
View File
@@ -36,7 +36,7 @@ pfUI:RegisterSkin("Trainer", function ()
StripTextures(ClassTrainerSkillIcon) StripTextures(ClassTrainerSkillIcon)
SkinButton(ClassTrainerSkillIcon, nil, nil, nil, nil, true) SkinButton(ClassTrainerSkillIcon, nil, nil, nil, nil, true)
pfUI.hooksecurefunc("ClassTrainer_SetSelection", function() hooksecurefunc("ClassTrainer_SetSelection", function()
HandleIcon(ClassTrainerSkillIcon, ClassTrainerSkillIcon:GetNormalTexture()) HandleIcon(ClassTrainerSkillIcon, ClassTrainerSkillIcon:GetNormalTexture())
end) end)