mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-11 08:00:01 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c994d00596 | ||
|
|
4be680183a | ||
|
|
2352f1c6ed | ||
|
|
305ff6c86e | ||
|
|
a8b131898b | ||
|
|
1f9be33772 | ||
|
|
a798e67b7f | ||
|
|
8b87e30266 | ||
|
|
f68b14e53b | ||
|
|
8ab6fab04f | ||
|
|
6d1bfe805e | ||
|
|
838f7f5d25 | ||
|
|
fad078fa87 | ||
|
|
48d76138ed |
+15
-19
@@ -231,7 +231,7 @@ end
|
|||||||
-- unit [string] the unitstring
|
-- unit [string] the unitstring
|
||||||
-- return: [table] string, r, g, b
|
-- return: [table] string, r, g, b
|
||||||
function pfUI.api.GetUnitColor(unitstr)
|
function pfUI.api.GetUnitColor(unitstr)
|
||||||
local _, class = UnitClass(unitstr)
|
local class = UnitClassBase(unitstr)
|
||||||
local classColor = PFUI_CLASS_COLORS[class]
|
local classColor = PFUI_CLASS_COLORS[class]
|
||||||
return classColor:GenerateHexColorMarkup(), classColor:GetRGB()
|
return classColor:GenerateHexColorMarkup(), classColor:GetRGB()
|
||||||
end
|
end
|
||||||
@@ -377,22 +377,20 @@ end
|
|||||||
-- 'str' [string] input string that should be matched
|
-- 'str' [string] input string that should be matched
|
||||||
-- 'pat' [string] unformatted pattern
|
-- 'pat' [string] unformatted pattern
|
||||||
-- returns: [strings] matched string in capture order
|
-- returns: [strings] matched string in capture order
|
||||||
local a, b, c, d, e
|
|
||||||
local _, va, vb, vc, vd, ve
|
|
||||||
local ra, rb, rc, rd, re
|
|
||||||
function pfUI.api.cmatch(str, pat)
|
function pfUI.api.cmatch(str, pat)
|
||||||
-- read capture indexes
|
-- idx* = the logical %N index of each physical capture slot (nil when the
|
||||||
a, b, c, d, e = GetCaptures(pat)
|
-- pattern has no %N$ markers); val* = the matched values in physical order.
|
||||||
_, _, va, vb, vc, vd, ve = string.find(str, pfUI.api.SanitizePattern(pat))
|
local idx1, idx2, idx3, idx4, idx5 = GetCaptures(pat)
|
||||||
|
local _, _, val1, val2, val3, val4, val5 = string.find(str, pfUI.api.SanitizePattern(pat))
|
||||||
|
|
||||||
-- put entries into the proper return values
|
-- reorder the physical matches into logical (%1..%5) order
|
||||||
ra = e == 1 and ve or d == 1 and vd or c == 1 and vc or b == 1 and vb or va
|
local out1 = idx5 == 1 and val5 or idx4 == 1 and val4 or idx3 == 1 and val3 or idx2 == 1 and val2 or val1
|
||||||
rb = e == 2 and ve or d == 2 and vd or c == 2 and vc or a == 2 and va or vb
|
local out2 = idx5 == 2 and val5 or idx4 == 2 and val4 or idx3 == 2 and val3 or idx1 == 2 and val1 or val2
|
||||||
rc = e == 3 and ve or d == 3 and vd or a == 3 and va or b == 3 and vb or vc
|
local out3 = idx5 == 3 and val5 or idx4 == 3 and val4 or idx1 == 3 and val1 or idx2 == 3 and val2 or val3
|
||||||
rd = e == 4 and ve or a == 4 and va or c == 4 and vc or b == 4 and vb or vd
|
local out4 = idx5 == 4 and val5 or idx1 == 4 and val1 or idx3 == 4 and val3 or idx2 == 4 and val2 or val4
|
||||||
re = a == 5 and va or d == 5 and vd or c == 5 and vc or b == 5 and vb or ve
|
local out5 = idx1 == 5 and val1 or idx4 == 5 and val4 or idx3 == 5 and val3 or idx2 == 5 and val2 or val5
|
||||||
|
|
||||||
return ra, rb, rc, rd, re
|
return out1, out2, out3, out4, out5
|
||||||
end
|
end
|
||||||
|
|
||||||
-- [ GetItemLinkByName ]
|
-- [ GetItemLinkByName ]
|
||||||
@@ -997,13 +995,10 @@ end
|
|||||||
|
|
||||||
-- [ GetStringColor ]
|
-- [ GetStringColor ]
|
||||||
-- Queries the pfUI setting strings and extract its color codes
|
-- Queries the pfUI setting strings and extract its color codes
|
||||||
-- returns r,g,b,a as numbers
|
-- returns r,g,b,a as strings
|
||||||
local color_cache = setmetatable({}, {
|
local color_cache = setmetatable({}, {
|
||||||
__index = function(t, k)
|
__index = function(t, k)
|
||||||
local color = { pfUI.api.strsplit(",", k) }
|
local color = { pfUI.api.strsplit(",", k) }
|
||||||
for i = 1, table.getn(color) do
|
|
||||||
color[i] = tonumber(color[i])
|
|
||||||
end
|
|
||||||
rawset(t, k, color)
|
rawset(t, k, color)
|
||||||
return color
|
return color
|
||||||
end
|
end
|
||||||
@@ -1018,7 +1013,8 @@ end
|
|||||||
-- returns a ColorMixin
|
-- returns a ColorMixin
|
||||||
local color_object_cache = setmetatable({}, {
|
local color_object_cache = setmetatable({}, {
|
||||||
__index = function(t, k)
|
__index = function(t, k)
|
||||||
local color = CreateColor(pfUI.api.GetStringColor(k))
|
local r,g,b,a = pfUI.api.GetStringColor(k)
|
||||||
|
local color = CreateColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
|
||||||
rawset(t, k, color)
|
rawset(t, k, color)
|
||||||
return color
|
return color
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-2
@@ -895,8 +895,7 @@ function pfUI.api.SkinDropDown(frame, cr, cg, cb, useSmall)
|
|||||||
CreateBackdrop(button)
|
CreateBackdrop(button)
|
||||||
|
|
||||||
button.backdrop:ClearAllPoints()
|
button.backdrop:ClearAllPoints()
|
||||||
button.backdrop:SetWidth(18)
|
button.backdrop:SetSize(18, 18)
|
||||||
button.backdrop:SetHeight(18)
|
|
||||||
button.backdrop:SetPoint("RIGHT", frame.backdrop, "RIGHT", -2, 0)
|
button.backdrop:SetPoint("RIGHT", frame.backdrop, "RIGHT", -2, 0)
|
||||||
|
|
||||||
if not button.icon then
|
if not button.icon then
|
||||||
|
|||||||
+15
-30
@@ -397,8 +397,7 @@ function pfUI.uf:UpdateConfig()
|
|||||||
|
|
||||||
f.power:ClearAllPoints()
|
f.power:ClearAllPoints()
|
||||||
f.power:SetPoint(f.config.panchor, f.hp, relative_point, f.config.poffx, -2 * default_border - spacing + f.config.poffy * GetPerfectPixel())
|
f.power:SetPoint(f.config.panchor, f.hp, relative_point, f.config.poffx, -2 * default_border - spacing + f.config.poffy * GetPerfectPixel())
|
||||||
f.power:SetWidth((f.config.pwidth ~= "-1" and f.config.pwidth or f.config.width))
|
f.power:SetSize((f.config.pwidth ~= "-1" and f.config.pwidth or f.config.width), f.config.pheight)
|
||||||
f.power:SetHeight(f.config.pheight)
|
|
||||||
if tonumber(f.config.pheight) < 0 then f.power:Hide() end
|
if tonumber(f.config.pheight) < 0 then f.power:Hide() end
|
||||||
|
|
||||||
pfUI.api.CreateBackdrop(f.power, default_border)
|
pfUI.api.CreateBackdrop(f.power, default_border)
|
||||||
@@ -790,8 +789,7 @@ function pfUI.uf:UpdateConfig()
|
|||||||
f.debuffs[i]:SetFrameLevel(12)
|
f.debuffs[i]:SetFrameLevel(12)
|
||||||
f.debuffs[i]:RegisterForClicks("RightButtonUp")
|
f.debuffs[i]:RegisterForClicks("RightButtonUp")
|
||||||
f.debuffs[i]:ClearAllPoints()
|
f.debuffs[i]:ClearAllPoints()
|
||||||
f.debuffs[i]:SetWidth(f.config.debuffsize)
|
f.debuffs[i]:SetSize(f.config.debuffsize, f.config.debuffsize)
|
||||||
f.debuffs[i]:SetHeight(f.config.debuffsize)
|
|
||||||
f.debuffs[i]:SetNormalTexture(nil)
|
f.debuffs[i]:SetNormalTexture(nil)
|
||||||
|
|
||||||
-- Create CD frame if it doesn't exist
|
-- Create CD frame if it doesn't exist
|
||||||
@@ -1182,15 +1180,9 @@ end
|
|||||||
function pfUI.uf.OnEnter()
|
function pfUI.uf.OnEnter()
|
||||||
if not this.label then return end
|
if not this.label then return end
|
||||||
|
|
||||||
-- Nampower: Set native mouseover unit for macro/addon compatibility
|
local unitstr = this.label .. this.id
|
||||||
if SetMouseoverUnit then
|
if UnitExists(unitstr) then
|
||||||
local unitstr = this.label .. this.id
|
SetMouseoverUnit(unitstr)
|
||||||
-- For GUID-based frames (focus), use the GUID directly
|
|
||||||
if this.label and string.find(this.label, "^0x") then
|
|
||||||
SetMouseoverUnit(this.label)
|
|
||||||
elseif UnitExists(unitstr) then
|
|
||||||
SetMouseoverUnit(unitstr)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if this.config.showtooltip == "0" then return end
|
if this.config.showtooltip == "0" then return end
|
||||||
@@ -1200,10 +1192,7 @@ function pfUI.uf.OnEnter()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function pfUI.uf.OnLeave()
|
function pfUI.uf.OnLeave()
|
||||||
-- Nampower: Clear native mouseover unit
|
SetMouseoverUnit("")
|
||||||
if SetMouseoverUnit then
|
|
||||||
SetMouseoverUnit()
|
|
||||||
end
|
|
||||||
|
|
||||||
GameTooltip:FadeOut()
|
GameTooltip:FadeOut()
|
||||||
end
|
end
|
||||||
@@ -1528,7 +1517,7 @@ function pfUI.uf:RefreshIndicators(unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if unit.happinessIcon and unit:GetName() == "pfPet" then -- Happiness Icon
|
if unit.happinessIcon and unit:GetName() == "pfPet" then -- Happiness Icon
|
||||||
local _, pclass = UnitClass("player")
|
local pclass = UnitClassBase("player")
|
||||||
if unit.config.happinessicon == "0" or pclass ~= "HUNTER" then
|
if unit.config.happinessicon == "0" or pclass ~= "HUNTER" then
|
||||||
unit.happinessIcon:Hide()
|
unit.happinessIcon:Hide()
|
||||||
else
|
else
|
||||||
@@ -1572,7 +1561,7 @@ function pfUI.uf:UpdateDruidMana(unit)
|
|||||||
local unitstr = unit.label .. unit.id
|
local unitstr = unit.label .. unit.id
|
||||||
if not UnitExists(unitstr) then bar:Hide() return end
|
if not UnitExists(unitstr) then bar:Hide() return end
|
||||||
if unit.label ~= "player" then
|
if unit.label ~= "player" then
|
||||||
local _, cls = UnitClass(unitstr)
|
local cls = UnitClassBase(unitstr)
|
||||||
if cls ~= "DRUID" then bar:Hide() return end
|
if cls ~= "DRUID" then bar:Hide() return end
|
||||||
end
|
end
|
||||||
if UnitPowerType(unitstr) == Enum.PowerType.Mana then bar:Hide() return end
|
if UnitPowerType(unitstr) == Enum.PowerType.Mana then bar:Hide() return end
|
||||||
@@ -1791,8 +1780,7 @@ function pfUI.uf:RefreshUnit(unit, component)
|
|||||||
if size ~= indicator.size or disptype ~= indicator.disp or indipos ~= indicator.ipos then
|
if size ~= indicator.size or disptype ~= indicator.disp or indipos ~= indicator.ipos then
|
||||||
indicator:ClearAllPoints()
|
indicator:ClearAllPoints()
|
||||||
indicator:SetPoint(indipos, 0, 0)
|
indicator:SetPoint(indipos, 0, 0)
|
||||||
indicator:SetHeight(size)
|
indicator:SetSize(size, size)
|
||||||
indicator:SetWidth(size)
|
|
||||||
indicator.size = size
|
indicator.size = size
|
||||||
indicator.disp = disptype
|
indicator.disp = disptype
|
||||||
indicator.ipos = indipos
|
indicator.ipos = indipos
|
||||||
@@ -1821,16 +1809,14 @@ function pfUI.uf:RefreshUnit(unit, component)
|
|||||||
indicator[debuff].tex:SetVertexColor(dispelColor:GetRGBA())
|
indicator[debuff].tex:SetVertexColor(dispelColor:GetRGBA())
|
||||||
indicator[debuff].tex:Show()
|
indicator[debuff].tex:Show()
|
||||||
indicator[debuff]:ClearAllPoints()
|
indicator[debuff]:ClearAllPoints()
|
||||||
indicator[debuff]:SetHeight(size)
|
indicator[debuff]:SetSize(size, size)
|
||||||
indicator[debuff]:SetWidth(size)
|
|
||||||
indicator[debuff]:SetBackdrop(nil)
|
indicator[debuff]:SetBackdrop(nil)
|
||||||
elseif disptype == "3" then
|
elseif disptype == "3" then
|
||||||
indicator[debuff].tex:SetTexture(dispelColor:GetRGBA())
|
indicator[debuff].tex:SetTexture(dispelColor:GetRGBA())
|
||||||
indicator[debuff].tex:SetVertexColor(1,1,1,1)
|
indicator[debuff].tex:SetVertexColor(1,1,1,1)
|
||||||
indicator[debuff].tex:Show()
|
indicator[debuff].tex:Show()
|
||||||
indicator[debuff]:ClearAllPoints()
|
indicator[debuff]:ClearAllPoints()
|
||||||
indicator[debuff]:SetHeight(size)
|
indicator[debuff]:SetSize(size, size)
|
||||||
indicator[debuff]:SetWidth(size)
|
|
||||||
indicator[debuff]:SetBackdrop(nil)
|
indicator[debuff]:SetBackdrop(nil)
|
||||||
elseif disptype == "2" then
|
elseif disptype == "2" then
|
||||||
indicator[debuff].tex:Hide()
|
indicator[debuff].tex:Hide()
|
||||||
@@ -2226,7 +2212,7 @@ function pfUI.uf:ClickAction(button)
|
|||||||
|
|
||||||
-- drop food on petframe
|
-- drop food on petframe
|
||||||
if label == "pet" and CursorHasItem() then
|
if label == "pet" and CursorHasItem() then
|
||||||
local _, playerClass = UnitClass("player")
|
local playerClass = UnitClassBase("player")
|
||||||
if playerClass == "HUNTER" then
|
if playerClass == "HUNTER" then
|
||||||
DropItemOnUnit("pet")
|
DropItemOnUnit("pet")
|
||||||
return
|
return
|
||||||
@@ -2279,8 +2265,7 @@ function pfUI.uf:AddIcon(frame, pos, icon, timeleft, stacks, start, duration)
|
|||||||
|
|
||||||
-- update icon configuration
|
-- update icon configuration
|
||||||
if frame.icon[pos].iconsize ~= iconsize or frame.icon[pos].spacing ~= spacing then
|
if frame.icon[pos].iconsize ~= iconsize or frame.icon[pos].spacing ~= spacing then
|
||||||
frame.icon[pos]:SetWidth(iconsize)
|
frame.icon[pos]:SetSize(iconsize, iconsize)
|
||||||
frame.icon[pos]:SetHeight(iconsize)
|
|
||||||
frame.icon[pos]:SetPoint("TOPLEFT", frame.icon, "TOPLEFT", (pos-1)*(iconsize + spacing), 0)
|
frame.icon[pos]:SetPoint("TOPLEFT", frame.icon, "TOPLEFT", (pos-1)*(iconsize + spacing), 0)
|
||||||
frame.icon[pos].stacks:SetFont(pfUI.font_unit, math.max(iconsize/3, 10), "OUTLINE")
|
frame.icon[pos].stacks:SetFont(pfUI.font_unit, math.max(iconsize/3, 10), "OUTLINE")
|
||||||
frame.icon[pos].iconsize = iconsize
|
frame.icon[pos].iconsize = iconsize
|
||||||
@@ -2336,7 +2321,7 @@ function pfUI.uf:HideIcon(frame, pos)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function pfUI.uf:SetupDebuffFilter(allclasses)
|
function pfUI.uf:SetupDebuffFilter(allclasses)
|
||||||
local _, myclass = UnitClass("player")
|
local myclass = UnitClassBase("player")
|
||||||
local debuffs = {}
|
local debuffs = {}
|
||||||
|
|
||||||
if myclass == "PALADIN" or myclass == "PRIEST" or myclass == "WARLOCK" or allclasses then
|
if myclass == "PALADIN" or myclass == "PRIEST" or myclass == "WARLOCK" or allclasses then
|
||||||
@@ -2359,7 +2344,7 @@ function pfUI.uf:SetupDebuffFilter(allclasses)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function pfUI.uf:SetupBuffIndicators(config)
|
function pfUI.uf:SetupBuffIndicators(config)
|
||||||
local _, myclass = UnitClass("player")
|
local myclass = UnitClassBase("player")
|
||||||
local indicators = {}
|
local indicators = {}
|
||||||
|
|
||||||
if config.show_buffs == "1" then -- buffs
|
if config.show_buffs == "1" then -- buffs
|
||||||
|
|||||||
+1
-2
@@ -29,8 +29,7 @@ if GetLocale() == "ruRU" then
|
|||||||
end
|
end
|
||||||
|
|
||||||
local libdebuff = CreateFrame("Frame", "pfdebuffsScanner", UIParent)
|
local libdebuff = CreateFrame("Frame", "pfdebuffsScanner", UIParent)
|
||||||
local _, class = UnitClass("player")
|
local class = UnitClassBase("player")
|
||||||
local lastspell
|
|
||||||
|
|
||||||
-- Nampower Support
|
-- Nampower Support
|
||||||
local hasNampower = false
|
local hasNampower = false
|
||||||
|
|||||||
+22
-20
@@ -89,7 +89,7 @@ libunitscan:SetScript("OnEvent", function()
|
|||||||
|
|
||||||
-- update own character details
|
-- update own character details
|
||||||
local name = UnitName("player")
|
local name = UnitName("player")
|
||||||
local _, class = UnitClass("player")
|
local class = UnitClassBase("player")
|
||||||
local level = UnitLevel("player")
|
local level = UnitLevel("player")
|
||||||
local guild = GetGuildInfo("player")
|
local guild = GetGuildInfo("player")
|
||||||
AddData("players", name, class, level, nil, guild)
|
AddData("players", name, class, level, nil, guild)
|
||||||
@@ -128,7 +128,7 @@ libunitscan:SetScript("OnEvent", function()
|
|||||||
local name, class, level, unit, _, guild
|
local name, class, level, unit, _, guild
|
||||||
for i = 1, GetNumPartyMembers() do
|
for i = 1, GetNumPartyMembers() do
|
||||||
unit = "party" .. i
|
unit = "party" .. i
|
||||||
_, class = UnitClass(unit)
|
class = UnitClassBase(unit)
|
||||||
name = UnitName(unit)
|
name = UnitName(unit)
|
||||||
level = UnitLevel(unit)
|
level = UnitLevel(unit)
|
||||||
guild = GetGuildInfo(unit)
|
guild = GetGuildInfo(unit)
|
||||||
@@ -149,24 +149,26 @@ libunitscan:SetScript("OnEvent", function()
|
|||||||
or event == "NAME_PLATE_UNIT_ADDED" and arg1
|
or event == "NAME_PLATE_UNIT_ADDED" and arg1
|
||||||
or "mouseover"
|
or "mouseover"
|
||||||
local name, class, level, elite, guild, _
|
local name, class, level, elite, guild, _
|
||||||
if UnitIsPlayer(scan) then
|
if UnitExists(scan) then
|
||||||
_, class = UnitClass(scan)
|
if UnitIsPlayer(scan) then
|
||||||
level = UnitLevel(scan)
|
class = UnitClassBase(scan)
|
||||||
-- UnitLevel returns -1 for unknown levels, don't overwrite known values
|
level = UnitLevel(scan)
|
||||||
level = level > 0 and level or nil
|
-- UnitLevel returns -1 for unknown levels, don't overwrite known values
|
||||||
name = UnitName(scan)
|
level = level > 0 and level or nil
|
||||||
guild = GetGuildInfo(scan)
|
name = UnitName(scan)
|
||||||
AddData("players", name, class, level, nil, guild)
|
guild = GetGuildInfo(scan)
|
||||||
RememberByUnit(scan, name, class)
|
AddData("players", name, class, level, nil, guild)
|
||||||
else
|
RememberByUnit(scan, name, class)
|
||||||
_, class = UnitClass(scan)
|
else
|
||||||
elite = UnitClassification(scan)
|
class = UnitClassBase(scan)
|
||||||
level = UnitLevel(scan)
|
elite = UnitClassification(scan)
|
||||||
-- UnitLevel returns -1 for unknown levels, don't overwrite known values
|
level = UnitLevel(scan)
|
||||||
level = level > 0 and level or nil
|
-- UnitLevel returns -1 for unknown levels, don't overwrite known values
|
||||||
name = UnitName(scan)
|
level = level > 0 and level or nil
|
||||||
guild = UnitSubName(scan)
|
name = UnitName(scan)
|
||||||
AddData("mobs", name, class, level, elite, guild)
|
guild = UnitSubName(scan)
|
||||||
|
AddData("mobs", name, class, level, elite, guild)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
+7
-13
@@ -1,5 +1,5 @@
|
|||||||
pfUI:RegisterModule("actionbar", function ()
|
pfUI:RegisterModule("actionbar", function ()
|
||||||
local _, class = UnitClass("player")
|
local class = UnitClassBase("player")
|
||||||
local _, cr, cg, cb = GetUnitColor('player')
|
local _, cr, cg, cb = GetUnitColor('player')
|
||||||
local er, eg, eb, ea = GetStringColor(pfUI_config.appearance.border.color)
|
local er, eg, eb, ea = GetStringColor(pfUI_config.appearance.border.color)
|
||||||
|
|
||||||
@@ -168,8 +168,7 @@ pfUI:RegisterModule("actionbar", function ()
|
|||||||
["zoomfade"] = function()
|
["zoomfade"] = function()
|
||||||
if this.active == 0 then
|
if this.active == 0 then
|
||||||
-- init animation
|
-- init animation
|
||||||
this:SetWidth(this.parent:GetWidth())
|
this:SetSize(this.parent:GetSize())
|
||||||
this:SetHeight(this.parent:GetHeight())
|
|
||||||
this:SetScale(this.parent:GetScale())
|
this:SetScale(this.parent:GetScale())
|
||||||
this.tex:SetTexture(this.parent.icon:GetTexture())
|
this.tex:SetTexture(this.parent.icon:GetTexture())
|
||||||
this.tex:SetVertexColor(this.parent.icon:GetVertexColor())
|
this.tex:SetVertexColor(this.parent.icon:GetVertexColor())
|
||||||
@@ -191,8 +190,7 @@ pfUI:RegisterModule("actionbar", function ()
|
|||||||
["shrinkreturn"] = function()
|
["shrinkreturn"] = function()
|
||||||
if this.active == 0 then
|
if this.active == 0 then
|
||||||
-- init animation
|
-- init animation
|
||||||
this:SetWidth(this.parent:GetWidth())
|
this:SetSize(this.parent:GetSize())
|
||||||
this:SetHeight(this.parent:GetHeight())
|
|
||||||
this:SetScale(this.parent:GetScale())
|
this:SetScale(this.parent:GetScale())
|
||||||
this.tex:SetTexture(this.parent.icon:GetTexture())
|
this.tex:SetTexture(this.parent.icon:GetTexture())
|
||||||
this.tex:SetVertexColor(this.parent.icon:GetVertexColor())
|
this.tex:SetVertexColor(this.parent.icon:GetVertexColor())
|
||||||
@@ -218,8 +216,7 @@ pfUI:RegisterModule("actionbar", function ()
|
|||||||
["elasticzoom"] = function()
|
["elasticzoom"] = function()
|
||||||
if this.active == 0 then
|
if this.active == 0 then
|
||||||
-- init animation
|
-- init animation
|
||||||
this:SetWidth(this.parent:GetWidth())
|
this:SetSize(this.parent:GetSize())
|
||||||
this:SetHeight(this.parent:GetHeight())
|
|
||||||
this:SetScale(this.parent:GetScale())
|
this:SetScale(this.parent:GetScale())
|
||||||
this.tex:SetTexture(this.parent.icon:GetTexture())
|
this.tex:SetTexture(this.parent.icon:GetTexture())
|
||||||
this.tex:SetVertexColor(this.parent.icon:GetVertexColor())
|
this.tex:SetVertexColor(this.parent.icon:GetVertexColor())
|
||||||
@@ -245,8 +242,7 @@ pfUI:RegisterModule("actionbar", function ()
|
|||||||
["wobblezoom"] = function()
|
["wobblezoom"] = function()
|
||||||
if this.active == 0 then
|
if this.active == 0 then
|
||||||
-- init animation
|
-- init animation
|
||||||
this:SetWidth(this.parent:GetWidth())
|
this:SetSize(this.parent:GetSize())
|
||||||
this:SetHeight(this.parent:GetHeight())
|
|
||||||
this:SetScale(this.parent:GetScale())
|
this:SetScale(this.parent:GetScale())
|
||||||
this.tex:SetTexture(this.parent.icon:GetTexture())
|
this.tex:SetTexture(this.parent.icon:GetTexture())
|
||||||
this.tex:SetVertexColor(this.parent.icon:GetVertexColor())
|
this.tex:SetVertexColor(this.parent.icon:GetVertexColor())
|
||||||
@@ -1176,8 +1172,7 @@ pfUI:RegisterModule("actionbar", function ()
|
|||||||
|
|
||||||
-- general appearance
|
-- general appearance
|
||||||
f.showempty = showempty == "1" and true or nil
|
f.showempty = showempty == "1" and true or nil
|
||||||
f:SetHeight(size)
|
f:SetSize(size, size)
|
||||||
f:SetWidth(size)
|
|
||||||
CreateBackdrop(f, border)
|
CreateBackdrop(f, border)
|
||||||
|
|
||||||
return f
|
return f
|
||||||
@@ -1349,8 +1344,7 @@ pfUI:RegisterModule("actionbar", function ()
|
|||||||
|
|
||||||
-- adjust actionbar size
|
-- adjust actionbar size
|
||||||
BarLayoutSize(bars[i], buttons, formfactor, size, border, spacing, uneven, fillmode)
|
BarLayoutSize(bars[i], buttons, formfactor, size, border, spacing, uneven, fillmode)
|
||||||
bars[i]:SetWidth(bars[i]._size[1])
|
bars[i]:SetSize(bars[i]._size[1], bars[i]._size[2])
|
||||||
bars[i]:SetHeight(bars[i]._size[2])
|
|
||||||
bars[i]:ClearAllPoints()
|
bars[i]:ClearAllPoints()
|
||||||
if i == 1 then -- main
|
if i == 1 then -- main
|
||||||
bars[i]:SetPoint("BOTTOM", 0, 2*border)
|
bars[i]:SetPoint("BOTTOM", 0, 2*border)
|
||||||
|
|||||||
+10
-18
@@ -37,15 +37,10 @@ pfUI:RegisterModule("addonbuttons", function ()
|
|||||||
|
|
||||||
pfUI.addonbuttons.minimapbutton = CreateFrame("Button", "pfMinimapButton", pfUI.minimap or UIParent)
|
pfUI.addonbuttons.minimapbutton = CreateFrame("Button", "pfMinimapButton", pfUI.minimap or UIParent)
|
||||||
pfUI.addonbuttons.minimapbutton:SetFrameLevel(24)
|
pfUI.addonbuttons.minimapbutton:SetFrameLevel(24)
|
||||||
pfUI.addonbuttons.minimapbutton:SetWidth(12)
|
pfUI.addonbuttons.minimapbutton:SetSize(12, 12)
|
||||||
pfUI.addonbuttons.minimapbutton:SetHeight(12)
|
|
||||||
|
|
||||||
pfUI.addonbuttons.minimapbutton:SetScript("OnClick", function()
|
pfUI.addonbuttons.minimapbutton:SetScript("OnClick", function()
|
||||||
if pfUI.addonbuttons:IsShown() then
|
pfUI.addonbuttons:SetShown(not pfUI.addonbuttons:IsShown())
|
||||||
pfUI.addonbuttons:Hide()
|
|
||||||
else
|
|
||||||
pfUI.addonbuttons:Show()
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
pfUI.addonbuttons.buttons = {}
|
pfUI.addonbuttons.buttons = {}
|
||||||
@@ -163,27 +158,25 @@ pfUI:RegisterModule("addonbuttons", function ()
|
|||||||
pfUI.addonbuttons:SetScale(pfUI.minimap:GetScale())
|
pfUI.addonbuttons:SetScale(pfUI.minimap:GetScale())
|
||||||
|
|
||||||
pfUI.addonbuttons.minimapbutton:ClearAllPoints()
|
pfUI.addonbuttons.minimapbutton:ClearAllPoints()
|
||||||
|
local mbtnWidth, mbtnHeight = pfUI.minimap:GetSize()
|
||||||
|
local dynamicSize = ceil((GetNumButtons() > 0 and GetNumButtons() or 1) / tonumber(C.abuttons.rowsize)) * GetStringSize() + tonumber(C.abuttons.spacing)
|
||||||
if C.abuttons.position == "bottom" then
|
if C.abuttons.position == "bottom" then
|
||||||
pfUI.addonbuttons:SetWidth(pfUI.minimap:GetWidth())
|
pfUI.addonbuttons:SetSize(mbtnWidth, dynamicSize)
|
||||||
pfUI.addonbuttons:SetHeight(ceil((GetNumButtons() > 0 and GetNumButtons() or 1) / tonumber(C.abuttons.rowsize)) * GetStringSize() + tonumber(C.abuttons.spacing))
|
|
||||||
pfUI.addonbuttons:SetPoint("TOP", pfUI.minimap, "BOTTOM", 0 , -default_border * 3)
|
pfUI.addonbuttons:SetPoint("TOP", pfUI.minimap, "BOTTOM", 0 , -default_border * 3)
|
||||||
SkinArrowButton(pfUI.addonbuttons.minimapbutton, "down")
|
SkinArrowButton(pfUI.addonbuttons.minimapbutton, "down")
|
||||||
pfUI.addonbuttons.minimapbutton:SetPoint("BOTTOM", pfUI.minimap, "BOTTOM", 0, 4)
|
pfUI.addonbuttons.minimapbutton:SetPoint("BOTTOM", pfUI.minimap, "BOTTOM", 0, 4)
|
||||||
elseif C.abuttons.position == "left" then
|
elseif C.abuttons.position == "left" then
|
||||||
pfUI.addonbuttons:SetWidth(ceil((GetNumButtons() > 0 and GetNumButtons() or 1) / tonumber(C.abuttons.rowsize)) * GetStringSize() + tonumber(C.abuttons.spacing))
|
pfUI.addonbuttons:SetSize(dynamicSize, mbtnHeight)
|
||||||
pfUI.addonbuttons:SetHeight(pfUI.minimap:GetHeight())
|
|
||||||
pfUI.addonbuttons:SetPoint("TOPRIGHT", pfUI.minimap, "TOPLEFT", -default_border * 3, 0)
|
pfUI.addonbuttons:SetPoint("TOPRIGHT", pfUI.minimap, "TOPLEFT", -default_border * 3, 0)
|
||||||
SkinArrowButton(pfUI.addonbuttons.minimapbutton, "left")
|
SkinArrowButton(pfUI.addonbuttons.minimapbutton, "left")
|
||||||
pfUI.addonbuttons.minimapbutton:SetPoint("LEFT", pfUI.minimap, "LEFT", 4, 0)
|
pfUI.addonbuttons.minimapbutton:SetPoint("LEFT", pfUI.minimap, "LEFT", 4, 0)
|
||||||
elseif C.abuttons.position == "top" then
|
elseif C.abuttons.position == "top" then
|
||||||
pfUI.addonbuttons:SetWidth(pfUI.minimap:GetWidth())
|
pfUI.addonbuttons:SetSize(mbtnWidth, dynamicSize)
|
||||||
pfUI.addonbuttons:SetHeight(ceil((GetNumButtons() > 0 and GetNumButtons() or 1) / tonumber(C.abuttons.rowsize)) * GetStringSize() + tonumber(C.abuttons.spacing))
|
|
||||||
pfUI.addonbuttons:SetPoint("BOTTOM", pfUI.minimap, "TOP", 0 , default_border * 3)
|
pfUI.addonbuttons:SetPoint("BOTTOM", pfUI.minimap, "TOP", 0 , default_border * 3)
|
||||||
SkinArrowButton(pfUI.addonbuttons.minimapbutton, "up")
|
SkinArrowButton(pfUI.addonbuttons.minimapbutton, "up")
|
||||||
pfUI.addonbuttons.minimapbutton:SetPoint("TOP", pfUI.minimap, "TOP", 0, -4)
|
pfUI.addonbuttons.minimapbutton:SetPoint("TOP", pfUI.minimap, "TOP", 0, -4)
|
||||||
elseif C.abuttons.position == "right" then
|
elseif C.abuttons.position == "right" then
|
||||||
pfUI.addonbuttons:SetWidth(ceil((GetNumButtons() > 0 and GetNumButtons() or 1) / tonumber(C.abuttons.rowsize)) * GetStringSize() + tonumber(C.abuttons.spacing))
|
pfUI.addonbuttons:SetSize(dynamicSize, mbtnHeight)
|
||||||
pfUI.addonbuttons:SetHeight(pfUI.minimap:GetHeight())
|
|
||||||
pfUI.addonbuttons:SetPoint("TOPLEFT", pfUI.minimap, "TOPRIGHT", default_border * 3, 0)
|
pfUI.addonbuttons:SetPoint("TOPLEFT", pfUI.minimap, "TOPRIGHT", default_border * 3, 0)
|
||||||
SkinArrowButton(pfUI.addonbuttons.minimapbutton, "right")
|
SkinArrowButton(pfUI.addonbuttons.minimapbutton, "right")
|
||||||
pfUI.addonbuttons.minimapbutton:SetPoint("RIGHT", pfUI.minimap, "RIGHT", -4, 0)
|
pfUI.addonbuttons.minimapbutton:SetPoint("RIGHT", pfUI.minimap, "RIGHT", -4, 0)
|
||||||
@@ -231,7 +224,7 @@ pfUI:RegisterModule("addonbuttons", function ()
|
|||||||
frame.backup.is_clamped_to_screen = frame:IsClampedToScreen()
|
frame.backup.is_clamped_to_screen = frame:IsClampedToScreen()
|
||||||
frame.backup.is_movable = frame:IsMovable()
|
frame.backup.is_movable = frame:IsMovable()
|
||||||
frame.backup.point = {frame:GetPoint()}
|
frame.backup.point = {frame:GetPoint()}
|
||||||
frame.backup.size = {frame:GetHeight(), frame:GetWidth()}
|
frame.backup.size = {frame:GetSize()}
|
||||||
frame.backup.scale = frame:GetScale()
|
frame.backup.scale = frame:GetScale()
|
||||||
if frame:HasScript("OnDragStart") then
|
if frame:HasScript("OnDragStart") then
|
||||||
frame.backup.on_drag_start = frame:GetScript("OnDragStart")
|
frame.backup.on_drag_start = frame:GetScript("OnDragStart")
|
||||||
@@ -256,8 +249,7 @@ pfUI:RegisterModule("addonbuttons", function ()
|
|||||||
frame:SetClampedToScreen(frame.backup.is_clamped_to_screen)
|
frame:SetClampedToScreen(frame.backup.is_clamped_to_screen)
|
||||||
frame:SetMovable(frame.backup.is_movable)
|
frame:SetMovable(frame.backup.is_movable)
|
||||||
frame:SetScale(frame.backup.scale)
|
frame:SetScale(frame.backup.scale)
|
||||||
frame:SetHeight(frame.backup.size[1])
|
frame:SetSize(frame.backup.size[2], frame.backup.size[1])
|
||||||
frame:SetWidth(frame.backup.size[2])
|
|
||||||
frame:ClearAllPoints()
|
frame:ClearAllPoints()
|
||||||
frame:SetPoint(frame.backup.point[1], frame.backup.point[2], frame.backup.point[3], frame.backup.point[4], frame.backup.point[5])
|
frame:SetPoint(frame.backup.point[1], frame.backup.point[2], frame.backup.point[3], frame.backup.point[4], frame.backup.point[5])
|
||||||
if frame.backup.on_drag_start ~= nil then
|
if frame.backup.on_drag_start ~= nil then
|
||||||
|
|||||||
+7
-14
@@ -18,8 +18,7 @@ pfUI:RegisterModule("addons", function ()
|
|||||||
-- addon window
|
-- addon window
|
||||||
pfUI.addons = CreateFrame("Frame", "pfAddons", UIParent)
|
pfUI.addons = CreateFrame("Frame", "pfAddons", UIParent)
|
||||||
pfUI.addons:SetFrameStrata("DIALOG")
|
pfUI.addons:SetFrameStrata("DIALOG")
|
||||||
pfUI.addons:SetHeight(490)
|
pfUI.addons:SetSize(380, 490)
|
||||||
pfUI.addons:SetWidth(380)
|
|
||||||
pfUI.addons:SetPoint("CENTER", 0,0)
|
pfUI.addons:SetPoint("CENTER", 0,0)
|
||||||
pfUI.addons:EnableMouseWheel(1)
|
pfUI.addons:EnableMouseWheel(1)
|
||||||
pfUI.addons:SetMovable(true)
|
pfUI.addons:SetMovable(true)
|
||||||
@@ -51,8 +50,7 @@ pfUI:RegisterModule("addons", function ()
|
|||||||
pfUI.addons.close = CreateFrame("Button", "pfBagClose", pfUI.addons)
|
pfUI.addons.close = CreateFrame("Button", "pfBagClose", pfUI.addons)
|
||||||
pfUI.addons.close:SetPoint("TOPRIGHT", -border*2,-border*2 )
|
pfUI.addons.close:SetPoint("TOPRIGHT", -border*2,-border*2 )
|
||||||
CreateBackdrop(pfUI.addons.close)
|
CreateBackdrop(pfUI.addons.close)
|
||||||
pfUI.addons.close:SetHeight(15)
|
pfUI.addons.close:SetSize(15, 15)
|
||||||
pfUI.addons.close:SetWidth(15)
|
|
||||||
pfUI.addons.close.texture = pfUI.addons.close:CreateTexture("pfBagClose")
|
pfUI.addons.close.texture = pfUI.addons.close:CreateTexture("pfBagClose")
|
||||||
pfUI.addons.close.texture:SetTexture(pfUI.media["img:close"])
|
pfUI.addons.close.texture:SetTexture(pfUI.media["img:close"])
|
||||||
pfUI.addons.close.texture:ClearAllPoints()
|
pfUI.addons.close.texture:ClearAllPoints()
|
||||||
@@ -125,8 +123,7 @@ pfUI:RegisterModule("addons", function ()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
pfUI.addons.profile:SetPoint("TOP", pfUI.addons, "TOP", 0, -30)
|
pfUI.addons.profile:SetPoint("TOP", pfUI.addons, "TOP", 0, -30)
|
||||||
pfUI.addons.profile:SetHeight(30)
|
pfUI.addons.profile:SetSize(370, 30)
|
||||||
pfUI.addons.profile:SetWidth(370)
|
|
||||||
CreateBackdrop(pfUI.addons.profile, nil, true)
|
CreateBackdrop(pfUI.addons.profile, nil, true)
|
||||||
|
|
||||||
-- addon profile: title
|
-- addon profile: title
|
||||||
@@ -139,8 +136,7 @@ pfUI:RegisterModule("addons", function ()
|
|||||||
-- addon profile: delete
|
-- addon profile: delete
|
||||||
pfUI.addons.profile.del = CreateFrame("Button", nil, pfUI.addons.profile, "UIPanelButtonTemplate")
|
pfUI.addons.profile.del = CreateFrame("Button", nil, pfUI.addons.profile, "UIPanelButtonTemplate")
|
||||||
SkinButton(pfUI.addons.profile.del)
|
SkinButton(pfUI.addons.profile.del)
|
||||||
pfUI.addons.profile.del:SetWidth(16)
|
pfUI.addons.profile.del:SetSize(16, 16)
|
||||||
pfUI.addons.profile.del:SetHeight(16)
|
|
||||||
pfUI.addons.profile.del:SetPoint("RIGHT", -10, 0)
|
pfUI.addons.profile.del:SetPoint("RIGHT", -10, 0)
|
||||||
pfUI.addons.profile.del:GetFontString():SetPoint("CENTER", 1, 0)
|
pfUI.addons.profile.del:GetFontString():SetPoint("CENTER", 1, 0)
|
||||||
pfUI.addons.profile.del:SetText("-")
|
pfUI.addons.profile.del:SetText("-")
|
||||||
@@ -157,8 +153,7 @@ pfUI:RegisterModule("addons", function ()
|
|||||||
-- addon profile: create
|
-- addon profile: create
|
||||||
pfUI.addons.profile.add = CreateFrame("Button", nil, pfUI.addons.profile, "UIPanelButtonTemplate")
|
pfUI.addons.profile.add = CreateFrame("Button", nil, pfUI.addons.profile, "UIPanelButtonTemplate")
|
||||||
SkinButton(pfUI.addons.profile.add)
|
SkinButton(pfUI.addons.profile.add)
|
||||||
pfUI.addons.profile.add:SetWidth(16)
|
pfUI.addons.profile.add:SetSize(16, 16)
|
||||||
pfUI.addons.profile.add:SetHeight(16)
|
|
||||||
pfUI.addons.profile.add:SetPoint("RIGHT", pfUI.addons.profile.del, "LEFT", -4, 0)
|
pfUI.addons.profile.add:SetPoint("RIGHT", pfUI.addons.profile.del, "LEFT", -4, 0)
|
||||||
pfUI.addons.profile.add:GetFontString():SetPoint("CENTER", 1, 0)
|
pfUI.addons.profile.add:GetFontString():SetPoint("CENTER", 1, 0)
|
||||||
pfUI.addons.profile.add:SetText("+")
|
pfUI.addons.profile.add:SetText("+")
|
||||||
@@ -201,8 +196,7 @@ pfUI:RegisterModule("addons", function ()
|
|||||||
|
|
||||||
-- addon list: scroll frame
|
-- addon list: scroll frame
|
||||||
pfUI.addons.scroll = CreateScrollFrame("pfAddonListScroll", pfUI.addons)
|
pfUI.addons.scroll = CreateScrollFrame("pfAddonListScroll", pfUI.addons)
|
||||||
pfUI.addons.scroll:SetWidth(360)
|
pfUI.addons.scroll:SetSize(360, 410)
|
||||||
pfUI.addons.scroll:SetHeight(410)
|
|
||||||
pfUI.addons.scroll:SetPoint("BOTTOM", 0, 10)
|
pfUI.addons.scroll:SetPoint("BOTTOM", 0, 10)
|
||||||
|
|
||||||
pfUI.addons.scroll.backdrop = CreateFrame("Frame", nil, pfUI.addons.scroll)
|
pfUI.addons.scroll.backdrop = CreateFrame("Frame", nil, pfUI.addons.scroll)
|
||||||
@@ -292,8 +286,7 @@ pfUI:RegisterModule("addons", function ()
|
|||||||
frame.adeps = { GetAddOnDependencies(i) } -- required (.toc Dependencies)
|
frame.adeps = { GetAddOnDependencies(i) } -- required (.toc Dependencies)
|
||||||
frame.aoptdeps = { C_AddOns.GetAddOnOptionalDependencies(i) } -- optional (.toc OptionalDeps)
|
frame.aoptdeps = { C_AddOns.GetAddOnOptionalDependencies(i) } -- optional (.toc OptionalDeps)
|
||||||
|
|
||||||
frame:SetWidth(340)
|
frame:SetSize(340, 25)
|
||||||
frame:SetHeight(25)
|
|
||||||
frame:SetPoint("TOPLEFT", 5, i * -25 + 20)
|
frame:SetPoint("TOPLEFT", 5, i * -25 + 20)
|
||||||
|
|
||||||
frame:SetBackdrop(pfUI.backdrop_hover)
|
frame:SetBackdrop(pfUI.backdrop_hover)
|
||||||
|
|||||||
+1
-2
@@ -48,8 +48,7 @@ pfUI:RegisterModule("afkcam", function ()
|
|||||||
local chat = CreateFrame("ScrollingMessageFrame", "pfAFKCamChat", overlay)
|
local chat = CreateFrame("ScrollingMessageFrame", "pfAFKCamChat", overlay)
|
||||||
chat:EnableMouse(false)
|
chat:EnableMouse(false)
|
||||||
chat:EnableMouseWheel(true)
|
chat:EnableMouseWheel(true)
|
||||||
chat:SetHeight(150)
|
chat:SetSize(500, 150)
|
||||||
chat:SetWidth(500)
|
|
||||||
chat:SetPoint("BOTTOMLEFT",overlay,"BOTTOMLEFT", 10, 10)
|
chat:SetPoint("BOTTOMLEFT",overlay,"BOTTOMLEFT", 10, 10)
|
||||||
chat:SetTimeVisible(1800.0)
|
chat:SetTimeVisible(1800.0)
|
||||||
chat:SetMaxLines(500)
|
chat:SetMaxLines(500)
|
||||||
|
|||||||
@@ -56,8 +56,7 @@ pfUI:RegisterModule("autovendor", function ()
|
|||||||
|
|
||||||
-- Setup Autosell button
|
-- Setup Autosell button
|
||||||
autovendor.button = CreateFrame("Button", "pfMerchantAutoVendorButton", MerchantFrame)
|
autovendor.button = CreateFrame("Button", "pfMerchantAutoVendorButton", MerchantFrame)
|
||||||
autovendor.button:SetWidth(36)
|
autovendor.button:SetSize(36, 36)
|
||||||
autovendor.button:SetHeight(36)
|
|
||||||
autovendor.button.icon = autovendor.button:CreateTexture("ARTWORK")
|
autovendor.button.icon = autovendor.button:CreateTexture("ARTWORK")
|
||||||
autovendor.button.icon:SetTexture("Interface\\Icons\\Spell_Shadow_SacrificialShield")
|
autovendor.button.icon:SetTexture("Interface\\Icons\\Spell_Shadow_SacrificialShield")
|
||||||
autovendor.button:SetScript("OnEnter", function()
|
autovendor.button:SetScript("OnEnter", function()
|
||||||
|
|||||||
+15
-33
@@ -326,8 +326,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
default_border + x*(frame.button_size+default_border*3),
|
default_border + x*(frame.button_size+default_border*3),
|
||||||
-default_border*2 - y*(frame.button_size+default_border*3) - topspace)
|
-default_border*2 - y*(frame.button_size+default_border*3) - topspace)
|
||||||
|
|
||||||
pfUI.bags[bag].slots[slot].frame:SetHeight(frame.button_size)
|
pfUI.bags[bag].slots[slot].frame:SetSize(frame.button_size, frame.button_size)
|
||||||
pfUI.bags[bag].slots[slot].frame:SetWidth(frame.button_size)
|
|
||||||
|
|
||||||
if x >= rowlength - 1 then
|
if x >= rowlength - 1 then
|
||||||
y = y + 1
|
y = y + 1
|
||||||
@@ -545,8 +544,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
local width = (frame.button_size/5*4 + default_border*2) * (max-min+1+extra)
|
local width = (frame.button_size/5*4 + default_border*2) * (max-min+1+extra)
|
||||||
local height = default_border + (frame.button_size/5*4 + default_border)
|
local height = default_border + (frame.button_size/5*4 + default_border)
|
||||||
|
|
||||||
frame.bagslots:SetWidth(width)
|
frame.bagslots:SetSize(width, height)
|
||||||
frame.bagslots:SetHeight(height)
|
|
||||||
for slot=min, max do
|
for slot=min, max do
|
||||||
if not frame.bagslots.slots[slot] then
|
if not frame.bagslots.slots[slot] then
|
||||||
frame.bagslots.slots[slot] = {}
|
frame.bagslots.slots[slot] = {}
|
||||||
@@ -606,8 +604,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
|
|
||||||
frame.bagslots.slots[slot].frame:ClearAllPoints()
|
frame.bagslots.slots[slot].frame:ClearAllPoints()
|
||||||
frame.bagslots.slots[slot].frame:SetPoint("TOPLEFT", frame.bagslots, "TOPLEFT", left, top)
|
frame.bagslots.slots[slot].frame:SetPoint("TOPLEFT", frame.bagslots, "TOPLEFT", left, top)
|
||||||
frame.bagslots.slots[slot].frame:SetHeight(frame.button_size/5*4)
|
frame.bagslots.slots[slot].frame:SetSize(frame.button_size/5*4, frame.button_size/5*4)
|
||||||
frame.bagslots.slots[slot].frame:SetWidth(frame.button_size/5*4)
|
|
||||||
|
|
||||||
CreateBackdrop(frame.bagslots.slots[slot].frame, default_border)
|
CreateBackdrop(frame.bagslots.slots[slot].frame, default_border)
|
||||||
frame.bagslots.slots[slot].frame:Show()
|
frame.bagslots.slots[slot].frame:Show()
|
||||||
@@ -626,8 +623,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
end
|
end
|
||||||
frame.bagslots.buy:SetPoint("RIGHT", frame.bagslots, "RIGHT", -default_border, 0)
|
frame.bagslots.buy:SetPoint("RIGHT", frame.bagslots, "RIGHT", -default_border, 0)
|
||||||
CreateBackdrop(frame.bagslots.buy, default_border)
|
CreateBackdrop(frame.bagslots.buy, default_border)
|
||||||
frame.bagslots.buy:SetHeight(frame.button_size/5*4)
|
frame.bagslots.buy:SetSize(frame.button_size/5*4, frame.button_size/5*4)
|
||||||
frame.bagslots.buy:SetWidth(frame.button_size/5*4)
|
|
||||||
frame.bagslots.buy:SetText("+")
|
frame.bagslots.buy:SetText("+")
|
||||||
frame.bagslots.buy:SetTextColor(.5,.5,1,1)
|
frame.bagslots.buy:SetTextColor(.5,.5,1,1)
|
||||||
frame.bagslots.buy:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
frame.bagslots.buy:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
||||||
@@ -719,8 +715,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
frame.close = CreateFrame("Button", "pfBagClose", frame)
|
frame.close = CreateFrame("Button", "pfBagClose", frame)
|
||||||
frame.close:SetPoint("TOPRIGHT", -default_border*1,-default_border )
|
frame.close:SetPoint("TOPRIGHT", -default_border*1,-default_border )
|
||||||
CreateBackdrop(frame.close, default_border)
|
CreateBackdrop(frame.close, default_border)
|
||||||
frame.close:SetHeight(12)
|
frame.close:SetSize(12, 12)
|
||||||
frame.close:SetWidth(12)
|
|
||||||
frame.close.texture = frame.close:CreateTexture("pfBagClose")
|
frame.close.texture = frame.close:CreateTexture("pfBagClose")
|
||||||
frame.close.texture:SetTexture(pfUI.media["img:close"])
|
frame.close.texture:SetTexture(pfUI.media["img:close"])
|
||||||
frame.close.texture:ClearAllPoints()
|
frame.close.texture:ClearAllPoints()
|
||||||
@@ -745,8 +740,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
frame.bags = CreateFrame("Button", "pfBagSlotShow", frame)
|
frame.bags = CreateFrame("Button", "pfBagSlotShow", frame)
|
||||||
frame.bags:SetPoint("TOPRIGHT", frame.close, "TOPLEFT", -default_border*3, 0)
|
frame.bags:SetPoint("TOPRIGHT", frame.close, "TOPLEFT", -default_border*3, 0)
|
||||||
CreateBackdrop(frame.bags, default_border)
|
CreateBackdrop(frame.bags, default_border)
|
||||||
frame.bags:SetHeight(12)
|
frame.bags:SetSize(12, 12)
|
||||||
frame.bags:SetWidth(12)
|
|
||||||
frame.bags:SetTextColor(1,1,.25,1)
|
frame.bags:SetTextColor(1,1,.25,1)
|
||||||
frame.bags:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
frame.bags:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
||||||
frame.bags.texture = frame.bags:CreateTexture("pfBagArrowUp")
|
frame.bags.texture = frame.bags:CreateTexture("pfBagArrowUp")
|
||||||
@@ -773,11 +767,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
frame.bags:SetScript("OnClick", function()
|
frame.bags:SetScript("OnClick", function()
|
||||||
if pfUI.bag.right.bagslots:IsShown() then
|
pfUI.bag.right.bagslots:SetShown(not pfUI.bag.right.bagslots:IsShown())
|
||||||
pfUI.bag.right.bagslots:Hide()
|
|
||||||
else
|
|
||||||
pfUI.bag.right.bagslots:Show()
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -786,8 +776,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
frame.open = CreateFrame("Button", "pfBagSlotOpen", frame)
|
frame.open = CreateFrame("Button", "pfBagSlotOpen", frame)
|
||||||
frame.open:SetPoint("TOPRIGHT", frame.bags, "TOPLEFT", -default_border*3, 0)
|
frame.open:SetPoint("TOPRIGHT", frame.bags, "TOPLEFT", -default_border*3, 0)
|
||||||
CreateBackdrop(frame.open, default_border)
|
CreateBackdrop(frame.open, default_border)
|
||||||
frame.open:SetHeight(12)
|
frame.open:SetSize(12, 12)
|
||||||
frame.open:SetWidth(12)
|
|
||||||
frame.open:SetTextColor(1,1,.25,1)
|
frame.open:SetTextColor(1,1,.25,1)
|
||||||
frame.open:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
frame.open:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
||||||
frame.open.texture = frame.open:CreateTexture("pfBagOpenContainer")
|
frame.open.texture = frame.open:CreateTexture("pfBagOpenContainer")
|
||||||
@@ -845,8 +834,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
frame.disenchant = CreateFrame("Button", "pfBagSlotDisenchant", frame)
|
frame.disenchant = CreateFrame("Button", "pfBagSlotDisenchant", frame)
|
||||||
frame.disenchant:SetPoint("TOPRIGHT", frame.open, "TOPLEFT", -default_border*3, 0)
|
frame.disenchant:SetPoint("TOPRIGHT", frame.open, "TOPLEFT", -default_border*3, 0)
|
||||||
CreateBackdrop(frame.disenchant, default_border)
|
CreateBackdrop(frame.disenchant, default_border)
|
||||||
frame.disenchant:SetHeight(12)
|
frame.disenchant:SetSize(12, 12)
|
||||||
frame.disenchant:SetWidth(12)
|
|
||||||
frame.disenchant:SetTextColor(1,1,.25,1)
|
frame.disenchant:SetTextColor(1,1,.25,1)
|
||||||
frame.disenchant:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
frame.disenchant:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
||||||
frame.disenchant.texture = frame.disenchant:CreateTexture("pfBagDisenchant")
|
frame.disenchant.texture = frame.disenchant:CreateTexture("pfBagDisenchant")
|
||||||
@@ -888,8 +876,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
frame.picklock = CreateFrame("Button", "pfBagSlotPicklock", frame)
|
frame.picklock = CreateFrame("Button", "pfBagSlotPicklock", frame)
|
||||||
frame.picklock:SetPoint("TOPRIGHT", frame.disenchant, "TOPLEFT", -default_border*3, 0)
|
frame.picklock:SetPoint("TOPRIGHT", frame.disenchant, "TOPLEFT", -default_border*3, 0)
|
||||||
CreateBackdrop(frame.picklock, default_border)
|
CreateBackdrop(frame.picklock, default_border)
|
||||||
frame.picklock:SetHeight(12)
|
frame.picklock:SetSize(12, 12)
|
||||||
frame.picklock:SetWidth(12)
|
|
||||||
frame.picklock:SetTextColor(1,1,.25,1)
|
frame.picklock:SetTextColor(1,1,.25,1)
|
||||||
frame.picklock:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
frame.picklock:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
||||||
frame.picklock.texture = frame.picklock:CreateTexture("pfBagPicklock")
|
frame.picklock.texture = frame.picklock:CreateTexture("pfBagPicklock")
|
||||||
@@ -931,8 +918,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
frame.keys = CreateFrame("Button", "pfBagSlotShow", frame)
|
frame.keys = CreateFrame("Button", "pfBagSlotShow", frame)
|
||||||
frame.keys:SetPoint("TOPRIGHT", frame.picklock, "TOPLEFT", -default_border*3, 0)
|
frame.keys:SetPoint("TOPRIGHT", frame.picklock, "TOPLEFT", -default_border*3, 0)
|
||||||
CreateBackdrop(frame.keys, default_border)
|
CreateBackdrop(frame.keys, default_border)
|
||||||
frame.keys:SetHeight(12)
|
frame.keys:SetSize(12, 12)
|
||||||
frame.keys:SetWidth(12)
|
|
||||||
frame.keys:SetTextColor(1,1,.25,1)
|
frame.keys:SetTextColor(1,1,.25,1)
|
||||||
frame.keys:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
frame.keys:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
||||||
frame.keys.texture = frame.keys:CreateTexture("pfBagArrowUp")
|
frame.keys.texture = frame.keys:CreateTexture("pfBagArrowUp")
|
||||||
@@ -974,8 +960,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
frame.sort = CreateFrame("Button", "pfBagSort", frame)
|
frame.sort = CreateFrame("Button", "pfBagSort", frame)
|
||||||
frame.sort:SetPoint("TOPRIGHT", frame.keys, "TOPLEFT", -default_border*3, 0)
|
frame.sort:SetPoint("TOPRIGHT", frame.keys, "TOPLEFT", -default_border*3, 0)
|
||||||
CreateBackdrop(frame.sort, default_border)
|
CreateBackdrop(frame.sort, default_border)
|
||||||
frame.sort:SetHeight(12)
|
frame.sort:SetSize(12, 12)
|
||||||
frame.sort:SetWidth(12)
|
|
||||||
frame.sort.texture = frame.sort:CreateTexture("pfBagSortIcon")
|
frame.sort.texture = frame.sort:CreateTexture("pfBagSortIcon")
|
||||||
frame.sort.texture:SetTexture(pfUI.media["img:sort"])
|
frame.sort.texture:SetTexture(pfUI.media["img:sort"])
|
||||||
frame.sort.texture:ClearAllPoints()
|
frame.sort.texture:ClearAllPoints()
|
||||||
@@ -1008,8 +993,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
if not frame.gold and (C.appearance.bags.movable == "1" or not pfUI.panel) then
|
if not frame.gold and (C.appearance.bags.movable == "1" or not pfUI.panel) then
|
||||||
frame.gold = CreateFrame("Frame", "pfBagGoldString", frame)
|
frame.gold = CreateFrame("Frame", "pfBagGoldString", frame)
|
||||||
frame.gold:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -4, 1)
|
frame.gold:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -4, 1)
|
||||||
frame.gold:SetWidth(200)
|
frame.gold:SetSize(200, 18)
|
||||||
frame.gold:SetHeight(18)
|
|
||||||
frame.gold:RegisterEvent("PLAYER_ENTERING_WORLD")
|
frame.gold:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||||
frame.gold:RegisterEvent("PLAYER_MONEY")
|
frame.gold:RegisterEvent("PLAYER_MONEY")
|
||||||
frame.gold:SetScript("OnEvent", function()
|
frame.gold:SetScript("OnEvent", function()
|
||||||
@@ -1145,8 +1129,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
frame.close = CreateFrame("Button", "pfBagClose", frame)
|
frame.close = CreateFrame("Button", "pfBagClose", frame)
|
||||||
frame.close:SetPoint("TOPRIGHT", -default_border*1,-default_border )
|
frame.close:SetPoint("TOPRIGHT", -default_border*1,-default_border )
|
||||||
CreateBackdrop(frame.close, default_border)
|
CreateBackdrop(frame.close, default_border)
|
||||||
frame.close:SetHeight(12)
|
frame.close:SetSize(12, 12)
|
||||||
frame.close:SetWidth(12)
|
|
||||||
frame.close.texture = frame.close:CreateTexture("pfBagClose")
|
frame.close.texture = frame.close:CreateTexture("pfBagClose")
|
||||||
frame.close.texture:SetTexture(pfUI.media["img:close"])
|
frame.close.texture:SetTexture(pfUI.media["img:close"])
|
||||||
frame.close.texture:ClearAllPoints()
|
frame.close.texture:ClearAllPoints()
|
||||||
@@ -1171,8 +1154,7 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
frame.bags = CreateFrame("Button", "pfBagSlotShow", frame)
|
frame.bags = CreateFrame("Button", "pfBagSlotShow", frame)
|
||||||
frame.bags:SetPoint("TOPRIGHT", frame.close, "TOPLEFT", -default_border*3, 0)
|
frame.bags:SetPoint("TOPRIGHT", frame.close, "TOPLEFT", -default_border*3, 0)
|
||||||
CreateBackdrop(frame.bags, default_border)
|
CreateBackdrop(frame.bags, default_border)
|
||||||
frame.bags:SetHeight(12)
|
frame.bags:SetSize(12, 12)
|
||||||
frame.bags:SetWidth(12)
|
|
||||||
frame.bags:SetTextColor(1,1,.25,1)
|
frame.bags:SetTextColor(1,1,.25,1)
|
||||||
frame.bags:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
frame.bags:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE")
|
||||||
frame.bags.texture = frame.bags:CreateTexture("pfBagArrowUp")
|
frame.bags.texture = frame.bags:CreateTexture("pfBagArrowUp")
|
||||||
|
|||||||
+2
-4
@@ -2,14 +2,12 @@ pfUI:RegisterModule("bgscore", function ()
|
|||||||
local bgframe = WorldStateAlwaysUpFrame
|
local bgframe = WorldStateAlwaysUpFrame
|
||||||
if not bgframe then
|
if not bgframe then
|
||||||
bgframe = CreateFrame("Frame", "WorldStateAlwaysUpFrame", UIParent)
|
bgframe = CreateFrame("Frame", "WorldStateAlwaysUpFrame", UIParent)
|
||||||
bgframe:SetWidth(200)
|
bgframe:SetSize(200, 25)
|
||||||
bgframe:SetHeight(25)
|
|
||||||
bgframe:SetPoint("TOP", UIParent, "TOP", 0, -100)
|
bgframe:SetPoint("TOP", UIParent, "TOP", 0, -100)
|
||||||
end
|
end
|
||||||
|
|
||||||
local mover = CreateFrame("Frame", "pfUIBGScoreMover", UIParent)
|
local mover = CreateFrame("Frame", "pfUIBGScoreMover", UIParent)
|
||||||
mover:SetWidth(220)
|
mover:SetSize(220, 30)
|
||||||
mover:SetHeight(30)
|
|
||||||
mover:SetPoint("TOP", UIParent, "TOP", 0, -100)
|
mover:SetPoint("TOP", UIParent, "TOP", 0, -100)
|
||||||
mover:SetFrameStrata("DIALOG")
|
mover:SetFrameStrata("DIALOG")
|
||||||
mover:SetMovable(true)
|
mover:SetMovable(true)
|
||||||
|
|||||||
+21
-16
@@ -277,28 +277,27 @@ pfUI:RegisterModule("buff", function ()
|
|||||||
-- config loading
|
-- config loading
|
||||||
function pfUI.buff:UpdateConfigBuffButton(buff)
|
function pfUI.buff:UpdateConfigBuffButton(buff)
|
||||||
local fontsize = C.buffs.fontsize == "-1" and C.global.font_size or C.buffs.fontsize
|
local fontsize = C.buffs.fontsize == "-1" and C.global.font_size or C.buffs.fontsize
|
||||||
|
local buffSize, buffSpacing = tonumber(C.buffs.size), tonumber(C.buffs.spacing)
|
||||||
local rowcount, relFrame, offsetX, offsetY
|
local rowcount, relFrame, offsetX, offsetY
|
||||||
if buff.btype == "HELPFUL" then
|
if buff.btype == "HELPFUL" then
|
||||||
if buff.weapon == 1 and C.buffs.separateweapons == "1" then
|
if buff.weapon == 1 and C.buffs.separateweapons == "1" then
|
||||||
rowcount = floor((buff.gid-1) / tonumber(C.buffs.wepbuffrowsize))
|
rowcount = floor((buff.gid-1) / tonumber(C.buffs.wepbuffrowsize))
|
||||||
relFrame = pfUI.buff.wepbuffs
|
relFrame = pfUI.buff.wepbuffs
|
||||||
offsetX = -(buff.gid-1-rowcount*tonumber(C.buffs.wepbuffrowsize))*(tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing))
|
offsetX = -(buff.gid-1-rowcount*tonumber(C.buffs.wepbuffrowsize))*(buffSize+2*buffSpacing)
|
||||||
offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing))
|
offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing)
|
||||||
else
|
else
|
||||||
rowcount = floor((buff.gid-1) / tonumber(C.buffs.buffrowsize))
|
rowcount = floor((buff.gid-1) / tonumber(C.buffs.buffrowsize))
|
||||||
relFrame = pfUI.buff.buffs
|
relFrame = pfUI.buff.buffs
|
||||||
offsetX = -(buff.gid-1-rowcount*tonumber(C.buffs.buffrowsize))*(tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing))
|
offsetX = -(buff.gid-1-rowcount*tonumber(C.buffs.buffrowsize))*(buffSize+2*buffSpacing)
|
||||||
offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing))
|
offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
rowcount = floor((buff.gid-1) / tonumber(C.buffs.debuffrowsize))
|
rowcount = floor((buff.gid-1) / tonumber(C.buffs.debuffrowsize))
|
||||||
relFrame = pfUI.buff.debuffs
|
relFrame = pfUI.buff.debuffs
|
||||||
offsetX = -(buff.gid-1-rowcount*tonumber(C.buffs.debuffrowsize))*(tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing))
|
offsetX = -(buff.gid-1-rowcount*tonumber(C.buffs.debuffrowsize))*(buffSize+2*buffSpacing)
|
||||||
offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing))
|
offsetY = -(rowcount) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+buffSize+2*buffSpacing)
|
||||||
end
|
end
|
||||||
|
buff:SetSize(buffSize, buffSize)
|
||||||
buff:SetWidth(tonumber(C.buffs.size))
|
|
||||||
buff:SetHeight(tonumber(C.buffs.size))
|
|
||||||
buff:ClearAllPoints()
|
buff:ClearAllPoints()
|
||||||
buff:SetPoint("TOPRIGHT", relFrame, "TOPRIGHT",offsetX, offsetY)
|
buff:SetPoint("TOPRIGHT", relFrame, "TOPRIGHT",offsetX, offsetY)
|
||||||
|
|
||||||
@@ -318,20 +317,26 @@ pfUI:RegisterModule("buff", function ()
|
|||||||
function pfUI.buff:UpdateConfig()
|
function pfUI.buff:UpdateConfig()
|
||||||
local fontsize = C.buffs.fontsize == "-1" and C.global.font_size or C.buffs.fontsize
|
local fontsize = C.buffs.fontsize == "-1" and C.global.font_size or C.buffs.fontsize
|
||||||
|
|
||||||
pfUI.buff.buffs:SetWidth(tonumber(C.buffs.buffrowsize) * (tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing)))
|
local spacing = tonumber(C.buffs.spacing)
|
||||||
pfUI.buff.buffs:SetHeight(ceil(32/tonumber(C.buffs.buffrowsize)) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing)))
|
local cell = tonumber(C.buffs.size) + 2 * spacing
|
||||||
pfUI.buff.buffs:SetPoint("TOPRIGHT", pfUI.minimap or UIParent, "TOPLEFT", -4*tonumber(C.buffs.spacing), 0)
|
local rowextra = C.buffs.textinside == "1" and 0 or (fontsize * 1.5)
|
||||||
|
|
||||||
|
local function SizeBuffFrame(frame, rowsize, count)
|
||||||
|
rowsize = tonumber(rowsize)
|
||||||
|
frame:SetSize(rowsize * cell, ceil(count / rowsize) * (rowextra + cell))
|
||||||
|
end
|
||||||
|
|
||||||
|
SizeBuffFrame(pfUI.buff.buffs, C.buffs.buffrowsize, 32)
|
||||||
|
pfUI.buff.buffs:SetPoint("TOPRIGHT", pfUI.minimap or UIParent, "TOPLEFT", -4 * spacing, 0)
|
||||||
UpdateMovable(pfUI.buff.buffs)
|
UpdateMovable(pfUI.buff.buffs)
|
||||||
|
|
||||||
pfUI.buff.debuffs:SetWidth(tonumber(C.buffs.debuffrowsize) * (tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing)))
|
SizeBuffFrame(pfUI.buff.debuffs, C.buffs.debuffrowsize, 16)
|
||||||
pfUI.buff.debuffs:SetHeight(ceil(16/tonumber(C.buffs.debuffrowsize)) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing)))
|
|
||||||
pfUI.buff.debuffs:SetPoint("TOPRIGHT", pfUI.buff.buffs, "BOTTOMRIGHT", 0, 0)
|
pfUI.buff.debuffs:SetPoint("TOPRIGHT", pfUI.buff.buffs, "BOTTOMRIGHT", 0, 0)
|
||||||
UpdateMovable(pfUI.buff.debuffs)
|
UpdateMovable(pfUI.buff.debuffs)
|
||||||
|
|
||||||
if C.buffs.separateweapons == "1" then
|
if C.buffs.separateweapons == "1" then
|
||||||
pfUI.buff.wepbuffs:ClearAllPoints()
|
pfUI.buff.wepbuffs:ClearAllPoints()
|
||||||
pfUI.buff.wepbuffs:SetWidth(tonumber(C.buffs.wepbuffrowsize) * (tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing)))
|
SizeBuffFrame(pfUI.buff.wepbuffs, C.buffs.wepbuffrowsize, 2)
|
||||||
pfUI.buff.wepbuffs:SetHeight(ceil(2/tonumber(C.buffs.wepbuffrowsize)) * ((C.buffs.textinside == "1" and 0 or (fontsize*1.5))+tonumber(C.buffs.size)+2*tonumber(C.buffs.spacing)))
|
|
||||||
pfUI.buff.wepbuffs:SetPoint("TOPRIGHT", pfUI.buff.debuffs, "BOTTOMRIGHT", 0, 0)
|
pfUI.buff.wepbuffs:SetPoint("TOPRIGHT", pfUI.buff.debuffs, "BOTTOMRIGHT", 0, 0)
|
||||||
pfUI.buff.wepbuffs:Show()
|
pfUI.buff.wepbuffs:Show()
|
||||||
UpdateMovable(pfUI.buff.wepbuffs)
|
UpdateMovable(pfUI.buff.wepbuffs)
|
||||||
|
|||||||
+13
-25
@@ -162,8 +162,7 @@ pfUI:RegisterModule("buffwatch", function ()
|
|||||||
local color = parent.color
|
local color = parent.color
|
||||||
local bordercolor = parent.bordercolor
|
local bordercolor = parent.bordercolor
|
||||||
local textcolor = parent.textcolor
|
local textcolor = parent.textcolor
|
||||||
local width = parent:GetWidth()
|
local width, height = parent:GetSize()
|
||||||
local height = parent:GetHeight()
|
|
||||||
local framename = "pf" .. parent.unit .. ( parent.type == "HARMFUL" and "Debuff" or "Buff" ) .. "Bar" .. bar
|
local framename = "pf" .. parent.unit .. ( parent.type == "HARMFUL" and "Debuff" or "Buff" ) .. "Bar" .. bar
|
||||||
|
|
||||||
local font = parent.config.use_unitfonts == "1" and pfUI.font_unit or pfUI.font_default
|
local font = parent.config.use_unitfonts == "1" and pfUI.font_unit or pfUI.font_default
|
||||||
@@ -172,8 +171,7 @@ pfUI:RegisterModule("buffwatch", function ()
|
|||||||
frame:EnableMouse(1)
|
frame:EnableMouse(1)
|
||||||
frame:Hide()
|
frame:Hide()
|
||||||
frame:SetPoint("BOTTOM", 0, (bar-1)*(height+2*border+1))
|
frame:SetPoint("BOTTOM", 0, (bar-1)*(height+2*border+1))
|
||||||
frame:SetWidth(width)
|
frame:SetSize(width, height)
|
||||||
frame:SetHeight(height)
|
|
||||||
|
|
||||||
frame.bar = CreateFrame("StatusBar", "pfBuffBar" .. bar, frame)
|
frame.bar = CreateFrame("StatusBar", "pfBuffBar" .. bar, frame)
|
||||||
frame.bar:SetPoint("TOPLEFT", frame, "TOPLEFT", height+1, 0)
|
frame.bar:SetPoint("TOPLEFT", frame, "TOPLEFT", height+1, 0)
|
||||||
@@ -202,8 +200,7 @@ pfUI:RegisterModule("buffwatch", function ()
|
|||||||
frame.time:SetJustifyH("RIGHT")
|
frame.time:SetJustifyH("RIGHT")
|
||||||
|
|
||||||
frame.icon = frame:CreateTexture(nil, "OVERLAY")
|
frame.icon = frame:CreateTexture(nil, "OVERLAY")
|
||||||
frame.icon:SetWidth(height)
|
frame.icon:SetSize(height, height)
|
||||||
frame.icon:SetHeight(height)
|
|
||||||
frame.icon:SetPoint("LEFT", frame, "LEFT", 0, 0)
|
frame.icon:SetPoint("LEFT", frame, "LEFT", 0, 0)
|
||||||
frame.icon:SetTexCoord(.07,.93,.07,.93)
|
frame.icon:SetTexCoord(.07,.93,.07,.93)
|
||||||
|
|
||||||
@@ -225,7 +222,7 @@ pfUI:RegisterModule("buffwatch", function ()
|
|||||||
|
|
||||||
CreateBackdrop(frame)
|
CreateBackdrop(frame)
|
||||||
CreateBackdropShadow(frame)
|
CreateBackdropShadow(frame)
|
||||||
if bordercolor.r ~= "0" and bordercolor.g ~= "0" and bordercolor.b ~= "0" and bordercolor.a ~= "0" then
|
if bordercolor.r ~= 0 and bordercolor.g ~= 0 and bordercolor.b ~= 0 and bordercolor.a ~= 0 then
|
||||||
frame.backdrop:SetBackdropBorderColor(bordercolor.r,bordercolor.g,bordercolor.b,1)
|
frame.backdrop:SetBackdropBorderColor(bordercolor.r,bordercolor.g,bordercolor.b,1)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -422,18 +419,15 @@ pfUI:RegisterModule("buffwatch", function ()
|
|||||||
if pfUI.uf.player and C.buffbar.pbuff.enable == "1" then
|
if pfUI.uf.player and C.buffbar.pbuff.enable == "1" then
|
||||||
pfUI.uf.player.buffbar = CreateBuffBarFrame("Player", "HELPFUL")
|
pfUI.uf.player.buffbar = CreateBuffBarFrame("Player", "HELPFUL")
|
||||||
local config = C.buffbar.pbuff
|
local config = C.buffbar.pbuff
|
||||||
local r, g, b, a = strsplit(",", config.color)
|
|
||||||
local br, bg, bb, ba = strsplit(",", config.bordercolor)
|
|
||||||
local tr, tg, tb, ta = strsplit(",", config.textcolor)
|
|
||||||
|
|
||||||
pfUI.uf.player.buffbar:SetWidth(config.width == "-1" and pfUI.uf.player:GetWidth() or config.width)
|
pfUI.uf.player.buffbar:SetWidth(config.width == "-1" and pfUI.uf.player:GetWidth() or config.width)
|
||||||
pfUI.uf.player.buffbar:SetHeight(config.height)
|
pfUI.uf.player.buffbar:SetHeight(config.height)
|
||||||
pfUI.uf.player.buffbar.threshold = tonumber(config.threshold)
|
pfUI.uf.player.buffbar.threshold = tonumber(config.threshold)
|
||||||
pfUI.uf.player.buffbar.config = config
|
pfUI.uf.player.buffbar.config = config
|
||||||
pfUI.uf.player.buffbar.buffcmp = config.sort == "asc" and asc or desc
|
pfUI.uf.player.buffbar.buffcmp = config.sort == "asc" and asc or desc
|
||||||
pfUI.uf.player.buffbar.color = { r = r, g = g, b = b, a = a }
|
pfUI.uf.player.buffbar.color = GetStringColorObject(config.color)
|
||||||
pfUI.uf.player.buffbar.bordercolor = { r = br, g = bg, b = bb, a = ba }
|
pfUI.uf.player.buffbar.bordercolor = GetStringColorObject(config.bordercolor)
|
||||||
pfUI.uf.player.buffbar.textcolor = { r = tr, g = tg, b = tb, a = ta }
|
pfUI.uf.player.buffbar.textcolor = GetStringColorObject(config.textcolor)
|
||||||
pfUI.uf.player.buffbar.anchors = {
|
pfUI.uf.player.buffbar.anchors = {
|
||||||
pfUI.uf.player,
|
pfUI.uf.player,
|
||||||
pfUI.uf.player and pfUI.uf.player.debuffs,
|
pfUI.uf.player and pfUI.uf.player.debuffs,
|
||||||
@@ -448,9 +442,6 @@ pfUI:RegisterModule("buffwatch", function ()
|
|||||||
-- create player debuffbars
|
-- create player debuffbars
|
||||||
if pfUI.uf.player and C.buffbar.pdebuff.enable == "1" then
|
if pfUI.uf.player and C.buffbar.pdebuff.enable == "1" then
|
||||||
local config = C.buffbar.pdebuff
|
local config = C.buffbar.pdebuff
|
||||||
local r, g, b, a = strsplit(",", config.color)
|
|
||||||
local br, bg, bb, ba = strsplit(",", config.bordercolor)
|
|
||||||
local tr, tg, tb, ta = strsplit(",", config.textcolor)
|
|
||||||
|
|
||||||
pfUI.uf.player.debuffbar = CreateBuffBarFrame("Player", "HARMFUL")
|
pfUI.uf.player.debuffbar = CreateBuffBarFrame("Player", "HARMFUL")
|
||||||
pfUI.uf.player.debuffbar:SetWidth(config.width == "-1" and pfUI.uf.player:GetWidth() or config.width)
|
pfUI.uf.player.debuffbar:SetWidth(config.width == "-1" and pfUI.uf.player:GetWidth() or config.width)
|
||||||
@@ -458,9 +449,9 @@ pfUI:RegisterModule("buffwatch", function ()
|
|||||||
pfUI.uf.player.debuffbar.threshold = tonumber(config.threshold)
|
pfUI.uf.player.debuffbar.threshold = tonumber(config.threshold)
|
||||||
pfUI.uf.player.debuffbar.config = config
|
pfUI.uf.player.debuffbar.config = config
|
||||||
pfUI.uf.player.debuffbar.buffcmp = config.sort == "asc" and asc or desc
|
pfUI.uf.player.debuffbar.buffcmp = config.sort == "asc" and asc or desc
|
||||||
pfUI.uf.player.debuffbar.color = { r = r, g = g, b = b, a = a }
|
pfUI.uf.player.debuffbar.color = GetStringColorObject(config.color)
|
||||||
pfUI.uf.player.debuffbar.bordercolor = { r = br, g = bg, b = bb, a = ba }
|
pfUI.uf.player.debuffbar.bordercolor = GetStringColorObject(config.bordercolor)
|
||||||
pfUI.uf.player.debuffbar.textcolor = { r = tr, g = tg, b = tb, a = ta }
|
pfUI.uf.player.debuffbar.textcolor = GetStringColorObject(config.textcolor)
|
||||||
pfUI.uf.player.debuffbar.anchors = {
|
pfUI.uf.player.debuffbar.anchors = {
|
||||||
pfUI.uf.player,
|
pfUI.uf.player,
|
||||||
pfUI.uf.player and pfUI.uf.player.buffbar and pfUI.uf.player.buffbar.bars,
|
pfUI.uf.player and pfUI.uf.player.buffbar and pfUI.uf.player.buffbar.bars,
|
||||||
@@ -476,18 +467,15 @@ pfUI:RegisterModule("buffwatch", function ()
|
|||||||
-- create target debuffbars
|
-- create target debuffbars
|
||||||
if pfUI.uf.target and C.buffbar.tdebuff.enable == "1" then
|
if pfUI.uf.target and C.buffbar.tdebuff.enable == "1" then
|
||||||
local config = C.buffbar.tdebuff
|
local config = C.buffbar.tdebuff
|
||||||
local r, g, b, a = strsplit(",", config.color)
|
|
||||||
local br, bg, bb, ba = strsplit(",", config.bordercolor)
|
|
||||||
local tr, tg, tb, ta = strsplit(",", config.textcolor)
|
|
||||||
|
|
||||||
pfUI.uf.target.debuffbar = CreateBuffBarFrame("Target", "HARMFUL")
|
pfUI.uf.target.debuffbar = CreateBuffBarFrame("Target", "HARMFUL")
|
||||||
pfUI.uf.target.debuffbar:SetWidth(config.width == "-1" and pfUI.uf.target:GetWidth() or config.width)
|
pfUI.uf.target.debuffbar:SetWidth(config.width == "-1" and pfUI.uf.target:GetWidth() or config.width)
|
||||||
pfUI.uf.target.debuffbar:SetHeight(config.height)
|
pfUI.uf.target.debuffbar:SetHeight(config.height)
|
||||||
pfUI.uf.target.debuffbar.config = config
|
pfUI.uf.target.debuffbar.config = config
|
||||||
pfUI.uf.target.debuffbar.buffcmp = config.sort == "asc" and asc or desc
|
pfUI.uf.target.debuffbar.buffcmp = config.sort == "asc" and asc or desc
|
||||||
pfUI.uf.target.debuffbar.color = { r = r, g = g, b = b, a = a }
|
pfUI.uf.target.debuffbar.color = GetStringColorObject(config.color)
|
||||||
pfUI.uf.target.debuffbar.bordercolor = { r = br, g = bg, b = bb, a = ba }
|
pfUI.uf.target.debuffbar.bordercolor = GetStringColorObject(config.bordercolor)
|
||||||
pfUI.uf.target.debuffbar.textcolor = { r = tr, g = tg, b = tb, a = ta }
|
pfUI.uf.target.debuffbar.textcolor = GetStringColorObject(config.textcolor)
|
||||||
pfUI.uf.target.debuffbar.threshold = tonumber(config.threshold)
|
pfUI.uf.target.debuffbar.threshold = tonumber(config.threshold)
|
||||||
pfUI.uf.target.debuffbar.anchors = {
|
pfUI.uf.target.debuffbar.anchors = {
|
||||||
pfUI.uf.target,
|
pfUI.uf.target,
|
||||||
|
|||||||
+1
-1
@@ -429,7 +429,7 @@ pfUI:RegisterModule("chat", function ()
|
|||||||
_G["ChatFrame" .. i .. "TabFlash"].Show = function() return end
|
_G["ChatFrame" .. i .. "TabFlash"].Show = function() return end
|
||||||
end
|
end
|
||||||
|
|
||||||
local _, class = UnitClass("player")
|
local class = UnitClassBase("player")
|
||||||
local classColor = PFUI_CLASS_COLORS[class]
|
local classColor = PFUI_CLASS_COLORS[class]
|
||||||
_G["ChatFrame" .. i .. "TabText"]:SetTextColor((classColor.r + .3) * .5, (classColor.g + .3) * .5, (classColor.b + .3) * .5, 1)
|
_G["ChatFrame" .. i .. "TabText"]:SetTextColor((classColor.r + .3) * .5, (classColor.g + .3) * .5, (classColor.b + .3) * .5, 1)
|
||||||
_G["ChatFrame" .. i .. "TabText"]:SetFont(panelfont,panelfont_size, "OUTLINE")
|
_G["ChatFrame" .. i .. "TabText"]:SetFont(panelfont,panelfont_size, "OUTLINE")
|
||||||
|
|||||||
@@ -96,8 +96,7 @@ pfUI:RegisterModule("chatcopy", function ()
|
|||||||
scroll:Hide()
|
scroll:Hide()
|
||||||
|
|
||||||
local editbox = CreateFrame("EditBox", "pfChatCopyBox" .. i, scroll)
|
local editbox = CreateFrame("EditBox", "pfChatCopyBox" .. i, scroll)
|
||||||
editbox:SetHeight(frame:GetHeight())
|
editbox:SetSize(frame:GetSize())
|
||||||
editbox:SetWidth(frame:GetWidth())
|
|
||||||
editbox:SetAllPoints(scroll)
|
editbox:SetAllPoints(scroll)
|
||||||
editbox:SetTextColor(1,1,1,1)
|
editbox:SetTextColor(1,1,1,1)
|
||||||
editbox:SetFontObject(ChatFontNormal)
|
editbox:SetFontObject(ChatFontNormal)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ pfUI:RegisterModule("combopoints", function ()
|
|||||||
ComboFrame:Hide()
|
ComboFrame:Hide()
|
||||||
ComboFrame:UnregisterAllEvents()
|
ComboFrame:UnregisterAllEvents()
|
||||||
|
|
||||||
local _, class = UnitClass("player")
|
local class = UnitClassBase("player")
|
||||||
local combo_width = C["unitframes"]["combowidth"]
|
local combo_width = C["unitframes"]["combowidth"]
|
||||||
local combo_height = C["unitframes"]["comboheight"]
|
local combo_height = C["unitframes"]["comboheight"]
|
||||||
pfUI.combopoints = {}
|
pfUI.combopoints = {}
|
||||||
|
|||||||
@@ -123,8 +123,7 @@ pfUI:RegisterModule("easteregg", function ()
|
|||||||
local f = GetExplosion()
|
local f = GetExplosion()
|
||||||
f:ClearAllPoints()
|
f:ClearAllPoints()
|
||||||
f:SetPoint("CENTER", fireworks, "TOPLEFT", x, y)
|
f:SetPoint("CENTER", fireworks, "TOPLEFT", x, y)
|
||||||
f:SetWidth(25)
|
f:SetSize(25, 25)
|
||||||
f:SetHeight(25)
|
|
||||||
f.tex:SetTexture(1,1,1,.5)
|
f.tex:SetTexture(1,1,1,.5)
|
||||||
f:SetAlpha(1)
|
f:SetAlpha(1)
|
||||||
f:Show()
|
f:Show()
|
||||||
@@ -134,8 +133,7 @@ pfUI:RegisterModule("easteregg", function ()
|
|||||||
local f = GetExplosion()
|
local f = GetExplosion()
|
||||||
f:ClearAllPoints()
|
f:ClearAllPoints()
|
||||||
f:SetPoint("CENTER", fireworks, "TOPLEFT", x+(math.random(0,100)-50), y+(math.random(0,100)-50))
|
f:SetPoint("CENTER", fireworks, "TOPLEFT", x+(math.random(0,100)-50), y+(math.random(0,100)-50))
|
||||||
f:SetWidth(2)
|
f:SetSize(2, 2)
|
||||||
f:SetHeight(2)
|
|
||||||
f.tex:SetTexture(math.random(),math.random(),math.random(),1)
|
f.tex:SetTexture(math.random(),math.random(),math.random(),1)
|
||||||
f:SetAlpha(1)
|
f:SetAlpha(1)
|
||||||
f:Show()
|
f:Show()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ local function getAdjustedTickTimer()
|
|||||||
local adjustedEnergyTick = 2
|
local adjustedEnergyTick = 2
|
||||||
|
|
||||||
-- Check rogue talents and compute energy tick timing reduction for Combat spec (1.18.0 Blade Rush Talent)
|
-- Check rogue talents and compute energy tick timing reduction for Combat spec (1.18.0 Blade Rush Talent)
|
||||||
if UnitClass("player") == "Rogue" then
|
if UnitClassBase("player") == "ROGUE" then
|
||||||
local _, _, _, _, currRank = GetTalentInfo(2, 16)
|
local _, _, _, _, currRank = GetTalentInfo(2, 16)
|
||||||
local bladeRushRank = currRank or 0
|
local bladeRushRank = currRank or 0
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,9 @@ pfUI:RegisterModule("farmmode", function ()
|
|||||||
pfUI.farmmap:RegisterForDrag("LeftButton")
|
pfUI.farmmap:RegisterForDrag("LeftButton")
|
||||||
pfUI.farmmap:SetScript("OnMouseWheel", function()
|
pfUI.farmmap:SetScript("OnMouseWheel", function()
|
||||||
if IsControlKeyDown() then
|
if IsControlKeyDown() then
|
||||||
this:SetWidth(this:GetWidth() + (arg1 > 0 and 10 or -10))
|
local adjust = (arg1 > 0 and 10 or -10)
|
||||||
this:SetHeight(this:GetHeight() + (arg1 > 0 and 10 or -10))
|
local width, height = this:GetSize()
|
||||||
|
this:SetSize(width + adjust, height + adjust)
|
||||||
Minimap_ZoomIn()
|
Minimap_ZoomIn()
|
||||||
Minimap_ZoomOut()
|
Minimap_ZoomOut()
|
||||||
elseif IsShiftKeyDown() then
|
elseif IsShiftKeyDown() then
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
pfUI:RegisterModule("hunterbar", function ()
|
pfUI:RegisterModule("hunterbar", function ()
|
||||||
local _,class = UnitClass("player")
|
local class = UnitClassBase("player")
|
||||||
if class ~= "HUNTER" or C.bars.hunterbar == "0" then return end
|
if class ~= "HUNTER" or C.bars.hunterbar == "0" then return end
|
||||||
|
|
||||||
-- Wing Clip (any rank) and Arcane Shot (any rank) spell IDs.
|
-- Wing Clip (any rank) and Arcane Shot (any rank) spell IDs.
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ pfUI:RegisterModule("innervatecall", function ()
|
|||||||
if not GetNampowerVersion then return end
|
if not GetNampowerVersion then return end
|
||||||
|
|
||||||
-- Only load for druids
|
-- Only load for druids
|
||||||
local _, playerClass = UnitClass("player")
|
if UnitClassBase("player") ~= "DRUID" then return end
|
||||||
if playerClass ~= "DRUID" then return end
|
|
||||||
|
|
||||||
local INNERVATE_SPELLID = 29166
|
local INNERVATE_SPELLID = 29166
|
||||||
|
|
||||||
|
|||||||
+4
-6
@@ -103,8 +103,8 @@ pfUI:RegisterModule("map", function ()
|
|||||||
|
|
||||||
WorldMapFrame:ClearAllPoints()
|
WorldMapFrame:ClearAllPoints()
|
||||||
WorldMapFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
|
WorldMapFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
|
||||||
WorldMapFrame:SetWidth(WorldMapButton:GetWidth() + 15)
|
local wmWidth, wmHeight = WorldMapButton:GetSize()
|
||||||
WorldMapFrame:SetHeight(WorldMapButton:GetHeight() + 55)
|
WorldMapFrame:SetSize(wmWidth + 15, wmHeight + 55)
|
||||||
LoadMovable(WorldMapFrame)
|
LoadMovable(WorldMapFrame)
|
||||||
|
|
||||||
-- skin
|
-- skin
|
||||||
@@ -126,8 +126,7 @@ pfUI:RegisterModule("map", function ()
|
|||||||
btn:SetHighlightTexture("")
|
btn:SetHighlightTexture("")
|
||||||
btn.text = _G["pfUI_map_autozoneswitchText"]
|
btn.text = _G["pfUI_map_autozoneswitchText"]
|
||||||
CreateBackdrop(btn, nil, true)
|
CreateBackdrop(btn, nil, true)
|
||||||
btn:SetWidth(14)
|
btn:SetSize(14, 14)
|
||||||
btn:SetHeight(14)
|
|
||||||
btn:SetPoint("RIGHT", WorldMapContinentDropDown, "LEFT", -8, 2)
|
btn:SetPoint("RIGHT", WorldMapContinentDropDown, "LEFT", -8, 2)
|
||||||
btn.text:ClearAllPoints()
|
btn.text:ClearAllPoints()
|
||||||
btn.text:SetPoint("RIGHT", btn, "LEFT", -4, 1)
|
btn.text:SetPoint("RIGHT", btn, "LEFT", -4, 1)
|
||||||
@@ -165,8 +164,7 @@ pfUI:RegisterModule("map", function ()
|
|||||||
WorldMapButton.coords.text:SetJustifyH("RIGHT")
|
WorldMapButton.coords.text:SetJustifyH("RIGHT")
|
||||||
|
|
||||||
WorldMapButton.coords:SetScript("OnUpdate", function()
|
WorldMapButton.coords:SetScript("OnUpdate", function()
|
||||||
local width = WorldMapButton:GetWidth()
|
local width, height = WorldMapButton:GetSize()
|
||||||
local height = WorldMapButton:GetHeight()
|
|
||||||
local mx, my = WorldMapButton:GetCenter()
|
local mx, my = WorldMapButton:GetCenter()
|
||||||
local scale = WorldMapButton:GetEffectiveScale()
|
local scale = WorldMapButton:GetEffectiveScale()
|
||||||
local x, y = GetCursorPosition()
|
local x, y = GetCursorPosition()
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ pfUI:RegisterModule("mapcolors", function ()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function ColorizeName(frame)
|
local function ColorizeName(frame)
|
||||||
local _, class = UnitClass(frame.unit)
|
local class = UnitClassBase(frame.unit)
|
||||||
local color = PFUI_CLASS_COLORS[class]
|
local color = PFUI_CLASS_COLORS[class]
|
||||||
frame.name = frame.name or UnitName(frame.unit)
|
frame.name = frame.name or UnitName(frame.unit)
|
||||||
frame.name = '|c'..color.colorStr..frame.name..'|r'
|
frame.name = '|c'..color.colorStr..frame.name..'|r'
|
||||||
|
|||||||
+36
-37
@@ -4,7 +4,6 @@ pfUI:RegisterModule("nameplates", function ()
|
|||||||
|
|
||||||
-- Local function references for performance
|
-- Local function references for performance
|
||||||
local GetTime = GetTime
|
local GetTime = GetTime
|
||||||
local UnitExists = UnitExists
|
|
||||||
local UnitName = UnitName
|
local UnitName = UnitName
|
||||||
local UnitClass = UnitClass
|
local UnitClass = UnitClass
|
||||||
local UnitLevel = UnitLevel
|
local UnitLevel = UnitLevel
|
||||||
@@ -58,6 +57,10 @@ pfUI:RegisterModule("nameplates", function ()
|
|||||||
local inFriendlyZone = false
|
local inFriendlyZone = false
|
||||||
local platecount = 0
|
local platecount = 0
|
||||||
local registry = {}
|
local registry = {}
|
||||||
|
-- Subset of registry that currently has a unit assigned (between
|
||||||
|
-- NAME_PLATE_UNIT_ADDED and _REMOVED). The central loop iterates this instead
|
||||||
|
-- of the full pool so hidden pool slots aren't touched every tick.
|
||||||
|
local visiblePlates = {}
|
||||||
|
|
||||||
local raidGuidCache = {} -- guid -> name (rebuilt on RAID_ROSTER_UPDATE/PARTY_MEMBERS_CHANGED)
|
local raidGuidCache = {} -- guid -> name (rebuilt on RAID_ROSTER_UPDATE/PARTY_MEMBERS_CHANGED)
|
||||||
|
|
||||||
@@ -69,7 +72,6 @@ pfUI:RegisterModule("nameplates", function ()
|
|||||||
-- guid -> nameplate, maintained on NAME_PLATE_UNIT_ADDED/_REMOVED so a cast
|
-- guid -> nameplate, maintained on NAME_PLATE_UNIT_ADDED/_REMOVED so a cast
|
||||||
-- event can find its plate in O(1) and only cache casts we actually show.
|
-- event can find its plate in O(1) and only cache casts we actually show.
|
||||||
local plateByGuid = {}
|
local plateByGuid = {}
|
||||||
local targetPlateGuid = nil
|
|
||||||
|
|
||||||
-- One-shot C_Spell poll. Only used to seed a plate that spawns while its
|
-- One-shot C_Spell poll. Only used to seed a plate that spawns while its
|
||||||
-- unit is already mid-cast (its SPELL_START_OTHER fired before the plate
|
-- unit is already mid-cast (its SPELL_START_OTHER fired before the plate
|
||||||
@@ -113,7 +115,7 @@ pfUI:RegisterModule("nameplates", function ()
|
|||||||
local debuffDisplayBuf = {} -- [i] = { effect, texture, stacks, dtype, duration, timeleft }
|
local debuffDisplayBuf = {} -- [i] = { effect, texture, stacks, dtype, duration, timeleft }
|
||||||
for i = 1, 16 do debuffDisplayBuf[i] = {} end
|
for i = 1, 16 do debuffDisplayBuf[i] = {} end
|
||||||
local threatMemory = {} -- guid -> true if mob had player targeted
|
local threatMemory = {} -- guid -> true if mob had player targeted
|
||||||
local debuffSeen = {} -- reusable table for debuff tracking (avoid GC churn)
|
-- local debuffSeen = {} -- reusable table for debuff tracking (avoid GC churn)
|
||||||
|
|
||||||
-- PERF: visiblePlateCount maintained event-driven (NAME_PLATE_UNIT_ADDED/_REMOVED)
|
-- PERF: visiblePlateCount maintained event-driven (NAME_PLATE_UNIT_ADDED/_REMOVED)
|
||||||
local visiblePlateCount = 0
|
local visiblePlateCount = 0
|
||||||
@@ -177,7 +179,6 @@ pfUI:RegisterModule("nameplates", function ()
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
local frameState = {
|
local frameState = {
|
||||||
now = 0,
|
now = 0,
|
||||||
hasTarget = false,
|
|
||||||
targetGuid = nil,
|
targetGuid = nil,
|
||||||
mouseoverGuid = nil,
|
mouseoverGuid = nil,
|
||||||
}
|
}
|
||||||
@@ -448,8 +449,7 @@ pfUI:RegisterModule("nameplates", function ()
|
|||||||
nameplate.debuffs[i]:SetPoint(aligna, nameplate.debuffs[i-limit], alignb, 0, space)
|
nameplate.debuffs[i]:SetPoint(aligna, nameplate.debuffs[i-limit], alignb, 0, space)
|
||||||
end
|
end
|
||||||
|
|
||||||
nameplate.debuffs[i]:SetWidth(tonumber(C.nameplates.debuffsize))
|
nameplate.debuffs[i]:SetSize(debuffsize, debuffsize)
|
||||||
nameplate.debuffs[i]:SetHeight(tonumber(C.nameplates.debuffsize))
|
|
||||||
|
|
||||||
-- Update cooldown display settings
|
-- Update cooldown display settings
|
||||||
if nameplate.debuffs[i].cd then
|
if nameplate.debuffs[i].cd then
|
||||||
@@ -476,9 +476,7 @@ nameplates:RegisterEvent("NAME_PLATE_UNIT_ADDED")
|
|||||||
nameplates:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
|
nameplates:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
|
||||||
nameplates:RegisterEvent("UNIT_AURA")
|
nameplates:RegisterEvent("UNIT_AURA")
|
||||||
nameplates:RegisterEvent("UNIT_FLAGS")
|
nameplates:RegisterEvent("UNIT_FLAGS")
|
||||||
-- nampower cast lifecycle for other units (gated by NP_EnableSpell{Start,Go}
|
nameplates:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
|
||||||
-- Events, enabled by libdebuff). Drives castbars event-first instead of
|
|
||||||
-- polling C_Spell on every plate each tick. Mirrors castbar.lua's target bar.
|
|
||||||
nameplates:RegisterEvent("SPELL_START_OTHER")
|
nameplates:RegisterEvent("SPELL_START_OTHER")
|
||||||
nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
||||||
|
|
||||||
@@ -498,7 +496,7 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
CacheConfig()
|
CacheConfig()
|
||||||
this:SetGameVariables()
|
this:SetGameVariables()
|
||||||
RebuildRaidGuidCache()
|
RebuildRaidGuidCache()
|
||||||
targetPlateGuid = UnitExists("target") and UnitGUID("target") or nil
|
frameState.targetGuid = UnitGUID("target")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Handle friendly zone nameplate disable feature
|
-- Handle friendly zone nameplate disable feature
|
||||||
@@ -558,6 +556,7 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
-- token itself for token-based UnitX reads (stable per plate lifetime).
|
-- token itself for token-based UnitX reads (stable per plate lifetime).
|
||||||
local plate = C_NamePlate.GetNamePlateForUnit(arg1)
|
local plate = C_NamePlate.GetNamePlateForUnit(arg1)
|
||||||
if plate and plate.nameplate then
|
if plate and plate.nameplate then
|
||||||
|
visiblePlates[plate] = plate
|
||||||
local guid = UnitGUID(arg1)
|
local guid = UnitGUID(arg1)
|
||||||
plate.nameplate.cachedGuid = guid
|
plate.nameplate.cachedGuid = guid
|
||||||
plate.nameplate.unit = arg1
|
plate.nameplate.unit = arg1
|
||||||
@@ -576,6 +575,8 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
visiblePlateCount = visiblePlateCount > 0 and visiblePlateCount - 1 or 0
|
visiblePlateCount = visiblePlateCount > 0 and visiblePlateCount - 1 or 0
|
||||||
-- arg1 = "nameplateN" unit token; UnitGUID still resolves inside the
|
-- arg1 = "nameplateN" unit token; UnitGUID still resolves inside the
|
||||||
-- handler (the slot is freed after dispatch returns)
|
-- handler (the slot is freed after dispatch returns)
|
||||||
|
local plate = C_NamePlate.GetNamePlateForUnit(arg1)
|
||||||
|
if plate then visiblePlates[plate] = nil end
|
||||||
local guid = UnitGUID(arg1)
|
local guid = UnitGUID(arg1)
|
||||||
if guid then
|
if guid then
|
||||||
if debuffCache[guid] then debuffCache[guid] = nil end
|
if debuffCache[guid] then debuffCache[guid] = nil end
|
||||||
@@ -583,7 +584,6 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
if combatColorCache[guid] then combatColorCache[guid] = nil end
|
if combatColorCache[guid] then combatColorCache[guid] = nil end
|
||||||
if castState[guid] then castState[guid] = nil end
|
if castState[guid] then castState[guid] = nil end
|
||||||
if plateByGuid[guid] then plateByGuid[guid] = nil end
|
if plateByGuid[guid] then plateByGuid[guid] = nil end
|
||||||
local plate = C_NamePlate.GetNamePlateForUnit(arg1)
|
|
||||||
if plate and plate.nameplate and plate.nameplate.cachedGuid == guid then
|
if plate and plate.nameplate and plate.nameplate.cachedGuid == guid then
|
||||||
plate.nameplate.cachedGuid = nil
|
plate.nameplate.cachedGuid = nil
|
||||||
plate.nameplate.unit = nil
|
plate.nameplate.unit = nil
|
||||||
@@ -591,10 +591,6 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
end
|
end
|
||||||
|
|
||||||
elseif event == "UNIT_FLAGS" then
|
elseif event == "UNIT_FLAGS" then
|
||||||
-- ClassicAPI: fires with arg1 == "nameplateN" when a unit's flags change
|
|
||||||
-- (stun, combat enter/leave). Flag that plate for an immediate update,
|
|
||||||
-- bypassing the throttle. Guard on the token prefix -- UNIT_FLAGS also
|
|
||||||
-- fires for target/party/raid, which aren't ours to handle here.
|
|
||||||
if arg1 and strfind(arg1, "^nameplate") then
|
if arg1 and strfind(arg1, "^nameplate") then
|
||||||
local plate = C_NamePlate.GetNamePlateForUnit(arg1)
|
local plate = C_NamePlate.GetNamePlateForUnit(arg1)
|
||||||
if plate and plate.nameplate then
|
if plate and plate.nameplate then
|
||||||
@@ -602,6 +598,17 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
elseif event == "UPDATE_MOUSEOVER_UNIT" then
|
||||||
|
local new = UnitGUID("mouseover")
|
||||||
|
local old = frameState.mouseoverGuid
|
||||||
|
if new ~= old then
|
||||||
|
frameState.mouseoverGuid = new
|
||||||
|
local po = old and plateByGuid[old]
|
||||||
|
if po then po.eventcache = true end
|
||||||
|
local pn = new and plateByGuid[new]
|
||||||
|
if pn then pn.eventcache = true end
|
||||||
|
end
|
||||||
|
|
||||||
elseif event == "SPELL_START_OTHER" then
|
elseif event == "SPELL_START_OTHER" then
|
||||||
-- nampower: arg2=spellId, arg3=casterGuid, arg6=castTime(ms),
|
-- nampower: arg2=spellId, arg3=casterGuid, arg6=castTime(ms),
|
||||||
-- arg7=channel duration(ms, 0 if not a channel), arg8=spellType
|
-- arg7=channel duration(ms, 0 if not a channel), arg8=spellType
|
||||||
@@ -652,7 +659,7 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
end
|
end
|
||||||
|
|
||||||
elseif event == "PLAYER_TARGET_CHANGED" then
|
elseif event == "PLAYER_TARGET_CHANGED" then
|
||||||
targetPlateGuid = UnitExists("target") and UnitGUID("target") or nil
|
frameState.targetGuid = UnitGUID('target')
|
||||||
-- Flag the target's plate for update
|
-- Flag the target's plate for update
|
||||||
local plate = C_NamePlate.GetNamePlateForUnit("target")
|
local plate = C_NamePlate.GetNamePlateForUnit("target")
|
||||||
if plate and plate.nameplate then
|
if plate and plate.nameplate then
|
||||||
@@ -681,21 +688,15 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
|
|
||||||
-- PERF: Cache GetTime() once per frame
|
-- PERF: Cache GetTime() once per frame
|
||||||
frameState.now = now
|
frameState.now = now
|
||||||
frameState.hasTarget, frameState.targetGuid = UnitExists("target")
|
|
||||||
frameState.mouseoverGuid = UnitGUID("mouseover")
|
|
||||||
|
|
||||||
-- propagate events to all nameplates
|
|
||||||
if this.eventcache then
|
if this.eventcache then
|
||||||
this.eventcache = nil
|
this.eventcache = nil
|
||||||
for plate in pairs(registry) do
|
for plate in pairs(visiblePlates) do
|
||||||
plate.eventcache = true
|
plate.nameplate.eventcache = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- visiblePlateCount is maintained event-driven via NAME_PLATE_UNIT_ADDED/_REMOVED.
|
for plate in pairs(visiblePlates) do
|
||||||
|
|
||||||
-- Central OnUpdate for all visible plates
|
|
||||||
for plate in pairs(registry) do
|
|
||||||
if plate:IsVisible() then
|
if plate:IsVisible() then
|
||||||
nameplates.OnUpdate(plate, frameState)
|
nameplates.OnUpdate(plate, frameState)
|
||||||
end
|
end
|
||||||
@@ -728,7 +729,7 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
nameplates.OnCreate = function(frame)
|
nameplates.OnCreate = function(frame)
|
||||||
local parent = frame or this
|
local parent = frame or this
|
||||||
platecount = platecount + 1
|
platecount = platecount + 1
|
||||||
platename = "pfNamePlate" .. platecount
|
local platename = "pfNamePlate" .. platecount
|
||||||
|
|
||||||
-- create pfUI nameplate overlay
|
-- create pfUI nameplate overlay
|
||||||
local nameplate = CreateFrame("Button", platename, parent)
|
local nameplate = CreateFrame("Button", platename, parent)
|
||||||
@@ -793,8 +794,7 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
|
|
||||||
nameplate.totem = CreateFrame("Frame", nil, nameplate)
|
nameplate.totem = CreateFrame("Frame", nil, nameplate)
|
||||||
nameplate.totem:SetPoint("CENTER", nameplate, "CENTER", 0, 0)
|
nameplate.totem:SetPoint("CENTER", nameplate, "CENTER", 0, 0)
|
||||||
nameplate.totem:SetHeight(32)
|
nameplate.totem:SetSize(32, 32)
|
||||||
nameplate.totem:SetWidth(32)
|
|
||||||
nameplate.totem.icon = nameplate.totem:CreateTexture(nil, "OVERLAY")
|
nameplate.totem.icon = nameplate.totem:CreateTexture(nil, "OVERLAY")
|
||||||
nameplate.totem.icon:SetTexCoord(.078, .92, .079, .937)
|
nameplate.totem.icon:SetTexCoord(.078, .92, .079, .937)
|
||||||
nameplate.totem.icon:SetAllPoints()
|
nameplate.totem.icon:SetAllPoints()
|
||||||
@@ -882,11 +882,11 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
|
|
||||||
local plate_width = C.nameplates.width + 50
|
local plate_width = C.nameplates.width + 50
|
||||||
local plate_height = C.nameplates.heighthealth + font_size + 5
|
local plate_height = C.nameplates.heighthealth + font_size + 5
|
||||||
local plate_height_cast = C.nameplates.heighthealth + font_size + 5 + C.nameplates.heightcast + 5
|
-- local plate_height_cast = C.nameplates.heighthealth + font_size + 5 + C.nameplates.heightcast + 5
|
||||||
local combo_size = 5
|
local combo_size = 5
|
||||||
|
|
||||||
local width = tonumber(C.nameplates.width)
|
-- local width = tonumber(C.nameplates.width)
|
||||||
local debuffsize = tonumber(C.nameplates.debuffsize)
|
-- local debuffsize = tonumber(C.nameplates.debuffsize)
|
||||||
local healthoffset = tonumber(C.nameplates.health.offset)
|
local healthoffset = tonumber(C.nameplates.health.offset)
|
||||||
local orientation = C.nameplates.verticalhealth == "1" and "VERTICAL" or "HORIZONTAL"
|
local orientation = C.nameplates.verticalhealth == "1" and "VERTICAL" or "HORIZONTAL"
|
||||||
|
|
||||||
@@ -1337,7 +1337,7 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
-- and immediately correct on de-target (unlike istarget which updates one tick later)
|
-- and immediately correct on de-target (unlike istarget which updates one tick later)
|
||||||
local targetGuid = state and state.targetGuid
|
local targetGuid = state and state.targetGuid
|
||||||
local target = (targetGuid and nameplate.cachedGuid and targetGuid == nameplate.cachedGuid) or
|
local target = (targetGuid and nameplate.cachedGuid and targetGuid == nameplate.cachedGuid) or
|
||||||
(state and state.hasTarget and frame:GetAlpha() >= 0.99) or nil
|
(state and state.targetGuid and frame:GetAlpha() >= 0.99) or nil
|
||||||
-- Target plate castbar runs on its own dedicated frame (nameplates.castbarFrame).
|
-- Target plate castbar runs on its own dedicated frame (nameplates.castbarFrame).
|
||||||
-- For non-target plates with castbar active, use castbar throttle to ensure
|
-- For non-target plates with castbar active, use castbar throttle to ensure
|
||||||
-- smooth animation without overloading the central loop.
|
-- smooth animation without overloading the central loop.
|
||||||
@@ -1451,7 +1451,7 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
|
|
||||||
-- Set non-target plate alpha
|
-- Set non-target plate alpha
|
||||||
local configAlpha = cfg.notargalpha or 0.5
|
local configAlpha = cfg.notargalpha or 0.5
|
||||||
local desiredAlpha = (target or not state.hasTarget) and 1 or configAlpha
|
local desiredAlpha = (target or not state.targetGuid) and 1 or configAlpha
|
||||||
|
|
||||||
if nameplate.cachedAlpha ~= desiredAlpha then
|
if nameplate.cachedAlpha ~= desiredAlpha then
|
||||||
nameplate:SetAlpha(desiredAlpha)
|
nameplate:SetAlpha(desiredAlpha)
|
||||||
@@ -1542,8 +1542,7 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
nameplate.health.zoomTransition = true
|
nameplate.health.zoomTransition = true
|
||||||
else
|
else
|
||||||
if nameplate.health.zoomTransition then
|
if nameplate.health.zoomTransition then
|
||||||
nameplate.health:SetWidth(wc)
|
nameplate.health:SetSize(wc, hc)
|
||||||
nameplate.health:SetHeight(hc)
|
|
||||||
nameplate.health.zoomTransition = nil
|
nameplate.health.zoomTransition = nil
|
||||||
end
|
end
|
||||||
nameplate.health.zoomed = true
|
nameplate.health.zoomed = true
|
||||||
@@ -1668,8 +1667,8 @@ nameplates:RegisterEvent("SPELL_FAILED_OTHER")
|
|||||||
-- loop's nameplates_castbar gate.)
|
-- loop's nameplates_castbar gate.)
|
||||||
nameplates.castbarFrame = CreateFrame("Frame", nil, UIParent)
|
nameplates.castbarFrame = CreateFrame("Frame", nil, UIParent)
|
||||||
nameplates.castbarFrame:SetScript("OnUpdate", function()
|
nameplates.castbarFrame:SetScript("OnUpdate", function()
|
||||||
if not cfg.showcastbar or not targetPlateGuid then return end
|
if not cfg.showcastbar or not frameState.targetGuid then return end
|
||||||
local nameplate = plateByGuid[targetPlateGuid]
|
local nameplate = plateByGuid[frameState.targetGuid]
|
||||||
if not nameplate then return end
|
if not nameplate then return end
|
||||||
nameplates.UpdateCastbar(nameplate, GetTime())
|
nameplates.UpdateCastbar(nameplate, GetTime())
|
||||||
end)
|
end)
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ pfUI:RegisterModule("player", function ()
|
|||||||
playerFrame.infoTopCenterText:SetHeight(14)
|
playerFrame.infoTopCenterText:SetHeight(14)
|
||||||
end
|
end
|
||||||
|
|
||||||
local _, myclass = UnitClass("player")
|
local myclass = UnitClassBase("player")
|
||||||
playerFrame.myclass = myclass
|
playerFrame.myclass = myclass
|
||||||
playerFrame.isSpellCaster = myclass ~= "WARRIOR" and myclass ~= "ROGUE" and myclass ~= "HUNTER"
|
playerFrame.isSpellCaster = myclass ~= "WARRIOR" and myclass ~= "ROGUE" and myclass ~= "HUNTER"
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ pfUI:RegisterModule("swingtimer", function ()
|
|||||||
local ohR, ohG, ohB, ohA = ParseColor(C.unitframes.swingtimerohcolor, 0.3, 0.8, 0.3, 1)
|
local ohR, ohG, ohB, ohA = ParseColor(C.unitframes.swingtimerohcolor, 0.3, 0.8, 0.3, 1)
|
||||||
local raR, raG, raB, raA = ParseColor(C.unitframes.swingtimerrangedcolor, 0.3, 0.6, 1.0, 1)
|
local raR, raG, raB, raA = ParseColor(C.unitframes.swingtimerrangedcolor, 0.3, 0.6, 1.0, 1)
|
||||||
local rwR, rwG, rwB, rwA = ParseColor(C.unitframes.swingtimerrangedwarncolor, 0.9, 0.0, 0.0, 1)
|
local rwR, rwG, rwB, rwA = ParseColor(C.unitframes.swingtimerrangedwarncolor, 0.9, 0.0, 0.0, 1)
|
||||||
local isHunter = UnitClass("player") == "Hunter"
|
local isHunter = UnitClassBase("player") == "HUNTER"
|
||||||
local mhDefaultR, mhDefaultG, mhDefaultB = mhR, mhG, mhB
|
local mhDefaultR, mhDefaultG, mhDefaultB = mhR, mhG, mhB
|
||||||
|
|
||||||
|
|
||||||
@@ -908,7 +908,7 @@ pfUI:RegisterModule("swingtimer", function ()
|
|||||||
S.autoAttackActive = false
|
S.autoAttackActive = false
|
||||||
|
|
||||||
elseif event == "PLAYER_ENTERING_WORLD" then
|
elseif event == "PLAYER_ENTERING_WORLD" then
|
||||||
local _, class = UnitClass("player")
|
local class = UnitClassBase("player")
|
||||||
S.isWarrior = (class == "WARRIOR")
|
S.isWarrior = (class == "WARRIOR")
|
||||||
S.isDruid = (class == "DRUID")
|
S.isDruid = (class == "DRUID")
|
||||||
UpdateWeaponSpeeds()
|
UpdateWeaponSpeeds()
|
||||||
|
|||||||
+2
-2
@@ -201,7 +201,7 @@ pfUI:RegisterModule("tooltip", function ()
|
|||||||
local pvpname = UnitPVPName(unit)
|
local pvpname = UnitPVPName(unit)
|
||||||
local name = UnitName(unit)
|
local name = UnitName(unit)
|
||||||
local validTarget, target = pcall(UnitName, unit .. 'target')
|
local validTarget, target = pcall(UnitName, unit .. 'target')
|
||||||
local _, class = UnitClass(unit)
|
local class = UnitClassBase(unit)
|
||||||
local guild, rankstr, rankid = GetGuildInfo(unit)
|
local guild, rankstr, rankid = GetGuildInfo(unit)
|
||||||
local reaction = UnitReaction(unit, "player")
|
local reaction = UnitReaction(unit, "player")
|
||||||
local pvptitle = gsub(gsub(pvpname or name, name, "", 1), "^%s*(.-)%s*$", "%1")
|
local pvptitle = gsub(gsub(pvpname or name, name, "", 1), "^%s*(.-)%s*$", "%1")
|
||||||
@@ -236,7 +236,7 @@ pfUI:RegisterModule("tooltip", function ()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if validTarget and target then
|
if validTarget and target then
|
||||||
local _, targetClass = UnitClass(unit .. "target")
|
local targetClass = UnitClassBase(unit .. "target")
|
||||||
local targetReaction = UnitReaction("player",unit .. "target")
|
local targetReaction = UnitReaction("player",unit .. "target")
|
||||||
if UnitIsPlayer(unit .. "target") and targetClass then
|
if UnitIsPlayer(unit .. "target") and targetClass then
|
||||||
local color = PFUI_CLASS_COLORS[targetClass]
|
local color = PFUI_CLASS_COLORS[targetClass]
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ pfUI:RegisterModule("tracking", function ()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
function pfUI.tracking:RefreshSpells()
|
function pfUI.tracking:RefreshSpells()
|
||||||
local _, playerClass = UnitClass("player")
|
local playerClass = UnitClassBase("player")
|
||||||
local isCatForm = pfUI.tracking:PlayerIsDruidInCatForm(playerClass)
|
local isCatForm = pfUI.tracking:PlayerIsDruidInCatForm(playerClass)
|
||||||
|
|
||||||
-- Build set of valid SpellIDs for this class
|
-- Build set of valid SpellIDs for this class
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ function pfUI:CheckNewModules()
|
|||||||
pfUI_init.seen_modules = pfUI_init.seen_modules or {}
|
pfUI_init.seen_modules = pfUI_init.seen_modules or {}
|
||||||
|
|
||||||
local pending = 0
|
local pending = 0
|
||||||
local _, playerClass = UnitClass("player")
|
local playerClass = UnitClassBase("player")
|
||||||
for _, entry in pairs(pfUI.new_modules) do
|
for _, entry in pairs(pfUI.new_modules) do
|
||||||
if not pfUI_init.seen_modules[entry.name] and pfUI_init["finalize"] then
|
if not pfUI_init.seen_modules[entry.name] and pfUI_init["finalize"] then
|
||||||
if not entry.class or entry.class == playerClass then
|
if not entry.class or entry.class == playerClass then
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ pfUI:RegisterSkin("Game Menu", function ()
|
|||||||
CreateBackdrop(GameMenuFrame, nil, true, .75)
|
CreateBackdrop(GameMenuFrame, nil, true, .75)
|
||||||
CreateBackdropShadow(GameMenuFrame)
|
CreateBackdropShadow(GameMenuFrame)
|
||||||
|
|
||||||
GameMenuFrame:SetWidth(GameMenuFrame:GetWidth() - 30)
|
local menuWidth, menuHeight = GameMenuFrame:GetSize()
|
||||||
GameMenuFrame:SetHeight(GameMenuFrame:GetHeight() + 6)
|
GameMenuFrame:SetSize(menuWidth - 30, menuHeight + 6)
|
||||||
|
|
||||||
local title = GetNoNameObject(GameMenuFrame, "FontString", "ARTWORK", MAIN_MENU)
|
local title = GetNoNameObject(GameMenuFrame, "FontString", "ARTWORK", MAIN_MENU)
|
||||||
title:SetTextColor(1,1,1,1)
|
title:SetTextColor(1,1,1,1)
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ pfUI:RegisterSkin("Options - New", function ()
|
|||||||
local er, eg, eb = pfUI.api.GetStringColor(pfUI_config.appearance.border.color)
|
local er, eg, eb = pfUI.api.GetStringColor(pfUI_config.appearance.border.color)
|
||||||
btn:SetBackdropColor(br, bg, bb, 0.75)
|
btn:SetBackdropColor(br, bg, bb, 0.75)
|
||||||
btn:SetBackdropBorderColor(er, eg, eb, 1)
|
btn:SetBackdropBorderColor(er, eg, eb, 1)
|
||||||
local _, class = UnitClass("player")
|
local class = UnitClassBase("player")
|
||||||
local color = PFUI_CLASS_COLORS[class]
|
local color = PFUI_CLASS_COLORS[class]
|
||||||
SetHighlight(btn, color.r, color.g, color.b)
|
SetHighlight(btn, color.r, color.g, color.b)
|
||||||
btn:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
|
btn:SetFont(pfUI.font_default, pfUI_config.global.font_size, "OUTLINE")
|
||||||
|
|||||||
Reference in New Issue
Block a user