mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 07:36:56 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 721ecce59d | |||
| 73b409fb88 | |||
| 0665764610 | |||
| 3faf06141f | |||
| 0c06401ec4 | |||
| c68e48111d |
+6
-14
@@ -19,10 +19,9 @@ function pfUI.uf.ClearGuidTracking()
|
||||
end
|
||||
|
||||
-- slash command to toggle unitframe test mode
|
||||
_G.SLASH_PFTEST1, _G.SLASH_PFTEST2 = "/pftest", "/pfuftest"
|
||||
_G.SlashCmdList.PFTEST = function()
|
||||
pfUI.api.RegisterSlashCommand("PFTEST", { "/pftest", "/pfuftest" }, function()
|
||||
pfUI.uf.showall = not pfUI.uf.showall
|
||||
end
|
||||
end, true)
|
||||
|
||||
-- HoT buff indicators that need name verification because their icons are
|
||||
-- reused by other spells. Maps icon (lowercased) → expected aura name +
|
||||
@@ -778,8 +777,7 @@ function pfUI.uf:UpdateConfig()
|
||||
invert_v * (i-1-row*perrow)*(multiply*default_border + f.config.buffsize + 1),
|
||||
invert_h * (row*(multiply*default_border + f.config.buffsize + 1) + (multiply*default_border + 1)))
|
||||
|
||||
f.buffs[i]:SetWidth(f.config.buffsize)
|
||||
f.buffs[i]:SetHeight(f.config.buffsize)
|
||||
f.buffs[i]:SetSize(f.config.buffsize, f.config.buffsize)
|
||||
|
||||
-- Create CD frame if it doesn't exist
|
||||
if not f.buffs[i].cd then
|
||||
@@ -808,11 +806,7 @@ function pfUI.uf:UpdateConfig()
|
||||
|
||||
-- immediately show/hide existing cooldown text
|
||||
if f.buffs[i].cd.pfCooldownText then
|
||||
if cooldown_text == 1 then
|
||||
f.buffs[i].cd.pfCooldownText:Show()
|
||||
else
|
||||
f.buffs[i].cd.pfCooldownText:Hide()
|
||||
end
|
||||
f.buffs[i].cd.pfCooldownText:SetShown(cooldown_text == 1)
|
||||
end
|
||||
|
||||
f.buffs[i].id = i
|
||||
@@ -3020,9 +3014,7 @@ end
|
||||
-- ============================================================================
|
||||
-- Slash Commands for Stats Frame
|
||||
-- ============================================================================
|
||||
_G.SLASH_PFUISTATS1 = "/pfuistats"
|
||||
_G.SLASH_PFUISTATS2 = "/ufstats"
|
||||
_G.SlashCmdList["PFUISTATS"] = function(msg)
|
||||
pfUI.api.RegisterSlashCommand("PFUISTATS", { "/pfuistats", "/ufstats" }, function(msg)
|
||||
msg = string.lower(msg or "")
|
||||
|
||||
if not pfUI.uf.stats then
|
||||
@@ -3074,4 +3066,4 @@ _G.SlashCmdList["PFUISTATS"] = function(msg)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end, true)
|
||||
@@ -4,7 +4,6 @@
|
||||
<Include file="..\libs\libdebuff.lua"/>
|
||||
<Include file="..\libs\librange.lua"/>
|
||||
<Include file="..\libs\libunitscan.lua"/>
|
||||
<Include file="..\libs\libtooltip.lua"/>
|
||||
<Include file="..\libs\libhealth.lua"/>
|
||||
<Include file="..\libs\libtotem.lua"/>
|
||||
<Include file="..\libs\libthrottle.lua"/>
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
-- load pfUI environment
|
||||
setfenv(1, pfUI:GetEnvironment())
|
||||
|
||||
--[[ libtooltip ]]--
|
||||
-- A pfUI library that provides additional GameTooltip information.
|
||||
--
|
||||
-- libtooltip:GetItemID()
|
||||
-- returns the itemID of the current GameTooltip
|
||||
-- `nil` when no item is displayed
|
||||
--
|
||||
-- libtooltip:GetItemLink()
|
||||
-- returns the itemLink of the current GameTooltip
|
||||
-- `nil` when no item is displayed
|
||||
--
|
||||
-- libtooltip:GetItemCount()
|
||||
-- returns the item count (bags) of the current GameTooltip
|
||||
-- `nil` when no item is displayed
|
||||
|
||||
-- return instantly when another libtooltip is already active
|
||||
if pfUI.api.libtooltip then return end
|
||||
|
||||
local libtooltip = CreateFrame("Frame" , "pfLibTooltip", GameTooltip)
|
||||
|
||||
libtooltip:SetScript("OnShow", function()
|
||||
if this:GetParent():HasItem() then
|
||||
libtooltip.itemName, libtooltip.itemLink, libtooltip.itemID = this:GetParent():GetItem()
|
||||
end
|
||||
end)
|
||||
|
||||
libtooltip:SetScript("OnHide", function()
|
||||
this.itemID = nil
|
||||
this.itemLink = nil
|
||||
this.itemCount = nil
|
||||
this.itemName = nil
|
||||
end)
|
||||
|
||||
-- core functions
|
||||
libtooltip.GetItemID = function(self)
|
||||
if not libtooltip.itemLink then return end
|
||||
if not libtooltip.itemID then
|
||||
libtooltip.itemID = C_Item.GetItemInfoInstant(libtooltip.itemLink)
|
||||
end
|
||||
|
||||
return libtooltip.itemID
|
||||
end
|
||||
|
||||
libtooltip.GetItemLink = function(self)
|
||||
return libtooltip.itemLink
|
||||
end
|
||||
|
||||
libtooltip.GetItemCount = function(self)
|
||||
return libtooltip.itemCount
|
||||
end
|
||||
|
||||
pfUI.api.libtooltip = libtooltip
|
||||
|
||||
hooksecurefunc(GameTooltip, "SetBagItem", function(self, container, slot)
|
||||
_, libtooltip.itemCount = GetContainerItemInfo(container, slot)
|
||||
end)
|
||||
@@ -440,6 +440,5 @@ pfUI:RegisterModule("addonbuttons", function ()
|
||||
|
||||
pfUI.addonbuttons:UpdateConfig()
|
||||
|
||||
_G.SLASH_PFABP1, _G.SLASH_PFABP2 = "/abp", "/pfabp"
|
||||
_G.SlashCmdList.PFABP = ManualAddOrRemove
|
||||
pfUI.api.RegisterSlashCommand("PFABP", { "/abp", "/pfabp" }, ManualAddOrRemove, true)
|
||||
end)
|
||||
|
||||
@@ -25,8 +25,7 @@ pfUI:RegisterModule("farmmode", function ()
|
||||
Minimap_ZoomOut()
|
||||
end
|
||||
|
||||
_G.SLASH_PFFARMMAP1, _G.SLASH_PFFARMMAP2 = "/farm", "/farmmode"
|
||||
_G.SlashCmdList.PFFARMMAP = ToggleFarmMode
|
||||
pfUI.api.RegisterSlashCommand("PFFARMMAP", { "/farm", "/farmmode" }, ToggleFarmMode, true)
|
||||
|
||||
pfUI.farmmap = CreateFrame("Minimap", "pfFarmMap", UIParent)
|
||||
pfUI.farmmap:Hide()
|
||||
|
||||
+6
-9
@@ -30,8 +30,7 @@ end)
|
||||
-- /focusname is pfUI-specific because the engine has no name→GUID
|
||||
-- lookup for off-screen units — we resolve via a short target-swap.
|
||||
|
||||
SLASH_PFFOCUSNAME1, SLASH_PFFOCUSNAME2 = '/focusname', '/pffocusname'
|
||||
function SlashCmdList.PFFOCUSNAME(msg)
|
||||
pfUI.api.RegisterSlashCommand("PFFOCUSNAME", { '/focusname', '/pffocusname' }, function(msg)
|
||||
if msg == "" then return end
|
||||
|
||||
local prevGUID = UnitGUID("target")
|
||||
@@ -61,10 +60,9 @@ function SlashCmdList.PFFOCUSNAME(msg)
|
||||
else
|
||||
ClearTarget()
|
||||
end
|
||||
end
|
||||
end, true)
|
||||
|
||||
SLASH_PFCASTFOCUS1, SLASH_PFCASTFOCUS2 = '/castfocus', '/pfcastfocus'
|
||||
function SlashCmdList.PFCASTFOCUS(msg)
|
||||
pfUI.api.RegisterSlashCommand("PFCASTFOCUS", { '/castfocus', '/pfcastfocus' }, function(msg)
|
||||
local focusGUID = UnitGUID("focus")
|
||||
if not focusGUID or focusGUID == "0x0000000000000000" then
|
||||
UIErrorsFrame:AddMessage(SPELL_FAILED_BAD_TARGETS, 1, 0, 0)
|
||||
@@ -105,10 +103,9 @@ function SlashCmdList.PFCASTFOCUS(msg)
|
||||
else
|
||||
TargetLastTarget()
|
||||
end
|
||||
end
|
||||
end, true)
|
||||
|
||||
SLASH_PFSWAPFOCUS1, SLASH_PFSWAPFOCUS2 = '/swapfocus', '/pfswapfocus'
|
||||
function SlashCmdList.PFSWAPFOCUS(msg)
|
||||
pfUI.api.RegisterSlashCommand("PFSWAPFOCUS", { '/swapfocus', '/pfswapfocus' }, function(msg)
|
||||
local targetGUID = UnitGUID("target")
|
||||
local oldFocusGUID = UnitGUID("focus")
|
||||
|
||||
@@ -118,4 +115,4 @@ function SlashCmdList.PFSWAPFOCUS(msg)
|
||||
TargetUnit(oldFocusGUID)
|
||||
end
|
||||
end
|
||||
end
|
||||
end, true)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
pfUI:RegisterNewModule("loothistory", "Loot History")
|
||||
pfUI:RegisterModule("loothistory", function ()
|
||||
local rawborder, border = GetBorderSize()
|
||||
|
||||
@@ -385,6 +384,5 @@ pfUI:RegisterModule("loothistory", function ()
|
||||
pfUI.loothistory:SetShown(not pfUI.loothistory:IsShown())
|
||||
end
|
||||
|
||||
_G.SLASH_PFLOOTHISTORY1, _G.SLASH_PFLOOTHISTORY2 = "/loothistory", "/pfloothistory"
|
||||
_G.SlashCmdList.PFLOOTHISTORY = Toggle
|
||||
pfUI.api.RegisterSlashCommand("PFLOOTHISTORY", { "/loothistory", "/pfloothistory" }, Toggle, true)
|
||||
end)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
pfUI:RegisterModule("mouseover", function ()
|
||||
_G.SLASH_PFCAST1, _G.SLASH_PFCAST2 = "/pfcast", "/pfmouse"
|
||||
function SlashCmdList.PFCAST(msg)
|
||||
pfUI.api.RegisterSlashCommand("PFCAST", { "/pfcast", "/pfmouse" }, function(msg)
|
||||
local func = pfUI.api.TryMemoizedFuncLoadstringForSpellCasts(msg)
|
||||
local unit = "mouseover"
|
||||
|
||||
@@ -30,5 +29,5 @@ pfUI:RegisterModule("mouseover", function ()
|
||||
if restore_target then TargetUnit(unit) end
|
||||
func()
|
||||
if restore_target then TargetLastTarget() end
|
||||
end
|
||||
end, true)
|
||||
end)
|
||||
@@ -150,9 +150,7 @@ pfUI:RegisterModule("nampower", function ()
|
||||
|
||||
-- /disenchantall slash command (DisenchantAll is Nampower-provided)
|
||||
if DisenchantAll then
|
||||
_G.SLASH_PFDISENCHANTALL1 = "/disenchantall"
|
||||
_G.SLASH_PFDISENCHANTALL2 = "/dea"
|
||||
SlashCmdList["PFDISENCHANTALL"] = function(msg)
|
||||
pfUI.api.RegisterSlashCommand("PFDISENCHANTALL", { "/disenchantall", "/dea" }, function(msg)
|
||||
-- DisenchantAll(itemIdOrName | quality, [includeSoulbound]).
|
||||
-- Quality is a string keyword ("greens", "blues", "purples", or pipe-
|
||||
-- combined). Numbers are interpreted as item IDs, not quality levels.
|
||||
@@ -161,7 +159,7 @@ pfUI:RegisterModule("nampower", function ()
|
||||
local target = tonumber(arg) or arg
|
||||
DisenchantAll(target)
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: DisenchantAll(" .. tostring(target) .. ")")
|
||||
end
|
||||
end, true)
|
||||
end
|
||||
|
||||
-- Druid Secondary Mana Bar
|
||||
|
||||
+2
-3
@@ -389,9 +389,8 @@ pfUI:RegisterModule("share", function ()
|
||||
end)
|
||||
end
|
||||
|
||||
_G.SLASH_PFEXPORT1, _G.SLASH_PFEXPORT2, _G.SLASH_PFEXPORT3 = "/export", "/import", "/share"
|
||||
function SlashCmdList.PFEXPORT(msg, editbox)
|
||||
pfUI.api.RegisterSlashCommand("PFEXPORT", { "/export", "/import", "/share" }, function(msg, editbox)
|
||||
f:Show()
|
||||
end
|
||||
end, true)
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
-- https://github.com/balakethelock/SuperWoW
|
||||
|
||||
-- DLL Status Check Command (always available)
|
||||
SLASH_PFDLLSTATUS1 = "/pfdll"
|
||||
SlashCmdList["PFDLLSTATUS"] = function()
|
||||
pfUI.api.RegisterSlashCommand("PFDLLSTATUS", { "/pfdll" }, function()
|
||||
local chat = DEFAULT_CHAT_FRAME
|
||||
chat:AddMessage("|cff33ffccpfUI|r: DLL Status Check")
|
||||
|
||||
@@ -43,7 +42,7 @@ SlashCmdList["PFDLLSTATUS"] = function()
|
||||
else
|
||||
chat:AddMessage(" |cffff0000Target frame|r: NOT found")
|
||||
end
|
||||
end
|
||||
end, true)
|
||||
|
||||
pfUI:RegisterModule("superwow", function ()
|
||||
if SetAutoloot and SpellInfo and not SUPERWOW_VERSION then
|
||||
@@ -173,12 +172,10 @@ pfUI:RegisterModule("superwow", function ()
|
||||
end
|
||||
|
||||
-- Add slash command for clickthrough toggle
|
||||
_G.SLASH_PFCLICKTHROUGH1 = "/clickthrough"
|
||||
_G.SLASH_PFCLICKTHROUGH2 = "/ct"
|
||||
SlashCmdList["PFCLICKTHROUGH"] = function()
|
||||
pfUI.api.RegisterSlashCommand("PFCLICKTHROUGH", { "/clickthrough", "/ct" }, function()
|
||||
local enabled = pfUI.api.ToggleClickthrough()
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: Clickthrough mode " .. (enabled and "|cff00ff00enabled|r" or "|cffff0000disabled|r"))
|
||||
end
|
||||
end, true)
|
||||
end
|
||||
|
||||
end)
|
||||
+6
-6
@@ -3,8 +3,7 @@ pfUI:RegisterModule("tooltip", function ()
|
||||
|
||||
pfUI.tooltip = CreateFrame('Frame', "pfTooltip", GameTooltip)
|
||||
pfUI.tooltip.anchorframe = CreateFrame('Frame', "pfTooltipAnchor", UIParent)
|
||||
pfUI.tooltip.anchorframe:SetWidth(128)
|
||||
pfUI.tooltip.anchorframe:SetHeight(72)
|
||||
pfUI.tooltip.anchorframe:SetSize(128, 72)
|
||||
pfUI.tooltip.anchorframe:SetPoint("TOP", UIParent, "TOP", 0, -50)
|
||||
pfUI.tooltip.anchorframe:Hide()
|
||||
UpdateMovable(pfUI.tooltip.anchorframe)
|
||||
@@ -30,8 +29,8 @@ pfUI:RegisterModule("tooltip", function ()
|
||||
-- create mouse follow frame
|
||||
if not tooltip.cursor then
|
||||
tooltip.cursor = CreateFrame("Frame", nil, UIParent)
|
||||
tooltip.cursor:SetWidth(tonumber(C.tooltip.cursoroffset) * 2)
|
||||
tooltip.cursor:SetHeight(tonumber(C.tooltip.cursoroffset) * 2)
|
||||
local size = tonumber(C.tooltip.cursoroffset) * 2
|
||||
tooltip.cursor:SetSize(size, size)
|
||||
tooltip.cursor:SetScript("OnUpdate", function()
|
||||
-- throttle - cursor following doesn't need to be every frame
|
||||
if (this.tick or 0) > GetTime() then return end
|
||||
@@ -172,8 +171,9 @@ pfUI:RegisterModule("tooltip", function ()
|
||||
local unit = pfUI.tooltip:GetUnit()
|
||||
if unit == "none" then
|
||||
-- process item tooltips
|
||||
if C.tooltip.itemid == "1" and libtooltip:GetItemID() then
|
||||
GameTooltip:AddLine(T["ItemID"] .. ": " .. libtooltip:GetItemID(), .25,.5,1)
|
||||
if C.tooltip.itemid == "1" and GameTooltip:HasItem() then
|
||||
local _, _, itemID = GameTooltip:GetItem()
|
||||
GameTooltip:AddLine(T["ItemID"] .. ": " .. itemID, .25,.5,1)
|
||||
GameTooltip:Show()
|
||||
end
|
||||
|
||||
|
||||
+2
-3
@@ -352,8 +352,7 @@ pfUI:RegisterModule("unitxp", function ()
|
||||
end
|
||||
|
||||
-- Debug command to test UnitXP indicators
|
||||
_G.SLASH_PFUNITXP1 = "/pfunitxp"
|
||||
SlashCmdList["PFUNITXP"] = function()
|
||||
pfUI.api.RegisterSlashCommand("PFUNITXP", { "/pfunitxp" }, function()
|
||||
local chat = DEFAULT_CHAT_FRAME
|
||||
chat:AddMessage("|cff33ffccpfUI|r: UnitXP Indicator Debug")
|
||||
|
||||
@@ -387,5 +386,5 @@ pfUI:RegisterModule("unitxp", function ()
|
||||
else
|
||||
chat:AddMessage(" Target frame: |cffff0000NOT found|r")
|
||||
end
|
||||
end
|
||||
end, true)
|
||||
end)
|
||||
@@ -5,11 +5,7 @@ end
|
||||
|
||||
SLASH_PFUI1 = '/pfui'
|
||||
function SlashCmdList.PFUI(msg, editbox)
|
||||
if pfUI.gui:IsShown() then
|
||||
pfUI.gui:Hide()
|
||||
else
|
||||
pfUI.gui:Show()
|
||||
end
|
||||
pfUI.gui:SetShown(not pfUI.gui:IsShown())
|
||||
end
|
||||
|
||||
SLASH_GM1, SLASH_GM2 = '/gm', '/support'
|
||||
|
||||
@@ -4,7 +4,25 @@ pfUI:RegisterSkin("Character", function ()
|
||||
|
||||
-- Honor Tab
|
||||
StripTextures(HonorFrame)
|
||||
StripTextures(ArenaFrame)
|
||||
if ArenaFrame then
|
||||
StripTextures(ArenaFrame)
|
||||
for _, frame in pairs({'Arena', 'Honor'}) do
|
||||
for i = 1, 2 do
|
||||
local tab = _G[frame.."FrameTab"..i]
|
||||
local lastTab = _G[frame.."FrameTab"..(i-1)]
|
||||
if lastTab and lastTab:IsShown() then
|
||||
tab:ClearAllPoints()
|
||||
tab:SetPoint("LEFT", lastTab, "RIGHT", border*2 + 1, 0)
|
||||
end
|
||||
SkinTab(tab)
|
||||
end
|
||||
end
|
||||
for i = 1, 3 do
|
||||
local team = _G["ArenaFrameTeam"..i]
|
||||
StripTextures(team)
|
||||
CreateBackdrop(team)
|
||||
end
|
||||
end
|
||||
|
||||
HonorFrameProgressBar:SetStatusBarTexture(pfUI.media["img:bar"])
|
||||
CreateBackdrop(HonorFrameProgressBar)
|
||||
|
||||
@@ -172,6 +172,14 @@ pfUI:RegisterSkin("Inspect", function ()
|
||||
|
||||
do -- Honor Tab
|
||||
StripTextures(InspectHonorFrame)
|
||||
if InspectArenaFrame then
|
||||
StripTextures(InspectArenaFrame)
|
||||
for i = 1, 3 do
|
||||
local team = _G["InspectArenaFrameTeam"..i]
|
||||
StripTextures(team)
|
||||
CreateBackdrop(team)
|
||||
end
|
||||
end
|
||||
|
||||
CreateBackdrop(InspectHonorFrameProgressBar)
|
||||
InspectHonorFrameProgressBar:SetStatusBarTexture(pfUI.media["img:bar"])
|
||||
|
||||
Reference in New Issue
Block a user