mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-21 23:26:56 +00:00
actionbar: entire rewrite of the actionbars
Final squashed commit of the actionbars. Ready for master. Config migration is now armed, you can't go back without backups.
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<!-- No, we cannot do that in lua... -->
|
||||
<Bindings>
|
||||
<!-- Paging Bar -->
|
||||
<Binding name="PFPAGING1" runOnUp="true" header="PFBARPAGING">pfActionButton(13)</Binding>
|
||||
<Binding name="PFPAGING2" runOnUp="true">pfActionButton(14)</Binding>
|
||||
<Binding name="PFPAGING3" runOnUp="true">pfActionButton(15)</Binding>
|
||||
<Binding name="PFPAGING4" runOnUp="true">pfActionButton(16)</Binding>
|
||||
<Binding name="PFPAGING5" runOnUp="true">pfActionButton(17)</Binding>
|
||||
<Binding name="PFPAGING6" runOnUp="true">pfActionButton(18)</Binding>
|
||||
<Binding name="PFPAGING7" runOnUp="true">pfActionButton(19)</Binding>
|
||||
<Binding name="PFPAGING8" runOnUp="true">pfActionButton(20)</Binding>
|
||||
<Binding name="PFPAGING9" runOnUp="true">pfActionButton(21)</Binding>
|
||||
<Binding name="PFPAGING10" runOnUp="true">pfActionButton(22)</Binding>
|
||||
<Binding name="PFPAGING11" runOnUp="true">pfActionButton(23)</Binding>
|
||||
<Binding name="PFPAGING12" runOnUp="true">pfActionButton(24)</Binding>
|
||||
|
||||
<!-- Special Bar -->
|
||||
<Binding name="PFSPECIAL1" runOnUp="true" header="PFBARSPECIAL">pfActionButton(73)</Binding>
|
||||
<Binding name="PFSPECIAL2" runOnUp="true">pfActionButton(74)</Binding>
|
||||
<Binding name="PFSPECIAL3" runOnUp="true">pfActionButton(75)</Binding>
|
||||
<Binding name="PFSPECIAL4" runOnUp="true">pfActionButton(76)</Binding>
|
||||
<Binding name="PFSPECIAL5" runOnUp="true">pfActionButton(77)</Binding>
|
||||
<Binding name="PFSPECIAL6" runOnUp="true">pfActionButton(78)</Binding>
|
||||
<Binding name="PFSPECIAL7" runOnUp="true">pfActionButton(79)</Binding>
|
||||
<Binding name="PFSPECIAL8" runOnUp="true">pfActionButton(80)</Binding>
|
||||
<Binding name="PFSPECIAL9" runOnUp="true">pfActionButton(81)</Binding>
|
||||
<Binding name="PFSPECIAL10" runOnUp="true">pfActionButton(82)</Binding>
|
||||
<Binding name="PFSPECIAL11" runOnUp="true">pfActionButton(83)</Binding>
|
||||
<Binding name="PFSPECIAL12" runOnUp="true">pfActionButton(84)</Binding>
|
||||
|
||||
<!-- Stance Bar 1 -->
|
||||
<Binding name="PFSTANCEONE1" runOnUp="true" header="PFBARSTANCEONE">pfActionButton(85)</Binding>
|
||||
<Binding name="PFSTANCEONE2" runOnUp="true">pfActionButton(86)</Binding>
|
||||
<Binding name="PFSTANCEONE3" runOnUp="true">pfActionButton(87)</Binding>
|
||||
<Binding name="PFSTANCEONE4" runOnUp="true">pfActionButton(88)</Binding>
|
||||
<Binding name="PFSTANCEONE5" runOnUp="true">pfActionButton(89)</Binding>
|
||||
<Binding name="PFSTANCEONE6" runOnUp="true">pfActionButton(90)</Binding>
|
||||
<Binding name="PFSTANCEONE7" runOnUp="true">pfActionButton(91)</Binding>
|
||||
<Binding name="PFSTANCEONE8" runOnUp="true">pfActionButton(92)</Binding>
|
||||
<Binding name="PFSTANCEONE9" runOnUp="true">pfActionButton(93)</Binding>
|
||||
<Binding name="PFSTANCEONE10" runOnUp="true">pfActionButton(94)</Binding>
|
||||
<Binding name="PFSTANCEONE11" runOnUp="true">pfActionButton(95)</Binding>
|
||||
<Binding name="PFSTANCEONE12" runOnUp="true">pfActionButton(96)</Binding>
|
||||
|
||||
<!-- Stance Bar 2 -->
|
||||
<Binding name="PFSTANCETWO1" runOnUp="true" header="PFBARSTANCETWO">pfActionButton(97)</Binding>
|
||||
<Binding name="PFSTANCETWO2" runOnUp="true">pfActionButton(98)</Binding>
|
||||
<Binding name="PFSTANCETWO3" runOnUp="true">pfActionButton(99)</Binding>
|
||||
<Binding name="PFSTANCETWO4" runOnUp="true">pfActionButton(100)</Binding>
|
||||
<Binding name="PFSTANCETWO5" runOnUp="true">pfActionButton(101)</Binding>
|
||||
<Binding name="PFSTANCETWO6" runOnUp="true">pfActionButton(102)</Binding>
|
||||
<Binding name="PFSTANCETWO7" runOnUp="true">pfActionButton(103)</Binding>
|
||||
<Binding name="PFSTANCETWO8" runOnUp="true">pfActionButton(104)</Binding>
|
||||
<Binding name="PFSTANCETWO9" runOnUp="true">pfActionButton(105)</Binding>
|
||||
<Binding name="PFSTANCETWO10" runOnUp="true">pfActionButton(106)</Binding>
|
||||
<Binding name="PFSTANCETWO11" runOnUp="true">pfActionButton(107)</Binding>
|
||||
<Binding name="PFSTANCETWO12" runOnUp="true">pfActionButton(108)</Binding>
|
||||
|
||||
<!-- Stance Bar 3 -->
|
||||
<Binding name="PFSTANCETHREE1" runOnUp="true" header="PFBARSTANCETHREE">pfActionButton(109)</Binding>
|
||||
<Binding name="PFSTANCETHREE2" runOnUp="true">pfActionButton(110)</Binding>
|
||||
<Binding name="PFSTANCETHREE3" runOnUp="true">pfActionButton(111)</Binding>
|
||||
<Binding name="PFSTANCETHREE4" runOnUp="true">pfActionButton(112)</Binding>
|
||||
<Binding name="PFSTANCETHREE5" runOnUp="true">pfActionButton(113)</Binding>
|
||||
<Binding name="PFSTANCETHREE6" runOnUp="true">pfActionButton(114)</Binding>
|
||||
<Binding name="PFSTANCETHREE7" runOnUp="true">pfActionButton(115)</Binding>
|
||||
<Binding name="PFSTANCETHREE8" runOnUp="true">pfActionButton(116)</Binding>
|
||||
<Binding name="PFSTANCETHREE9" runOnUp="true">pfActionButton(117)</Binding>
|
||||
<Binding name="PFSTANCETHREE10" runOnUp="true">pfActionButton(118)</Binding>
|
||||
<Binding name="PFSTANCETHREE11" runOnUp="true">pfActionButton(119)</Binding>
|
||||
<Binding name="PFSTANCETHREE12" runOnUp="true">pfActionButton(120)</Binding>
|
||||
</Bindings>
|
||||
+19
-5
@@ -814,11 +814,12 @@ function pfUI.api.BarButtonAnchor(button,basename,buttonindex,barsize,formfactor
|
||||
return button._anchor
|
||||
end
|
||||
|
||||
-- [ Create Autohide ] --
|
||||
-- [ Enable Autohide ] --
|
||||
-- 'frame' the frame that should be hidden
|
||||
function pfUI.api.CreateAutohide(frame)
|
||||
function pfUI.api.EnableAutohide(frame, timeout)
|
||||
if not frame then return end
|
||||
frame.hover = CreateFrame("Frame", frame:GetName() .. "Autohide", frame)
|
||||
|
||||
frame.hover = frame.hover or CreateFrame("Frame", frame:GetName() .. "Autohide", frame)
|
||||
frame.hover:SetParent(frame)
|
||||
frame.hover:SetAllPoints(frame)
|
||||
frame.hover.parent = frame
|
||||
@@ -828,20 +829,33 @@ function pfUI.api.CreateAutohide(frame)
|
||||
this:Hide()
|
||||
end)
|
||||
|
||||
local timeout = timeout
|
||||
frame.hover:SetScript("OnUpdate", function()
|
||||
if MouseIsOver(this, 10, -10, -10, 10) then
|
||||
this.activeTo = GetTime() + tonumber(pfUI_config.bars.hide_time)
|
||||
this.activeTo = GetTime() + timeout
|
||||
this.parent:SetAlpha(1)
|
||||
elseif this.activeTo then
|
||||
if this.activeTo < GetTime() and this.parent:GetAlpha() > 0 then
|
||||
this.parent:SetAlpha(this.parent:GetAlpha() - 0.1)
|
||||
end
|
||||
else
|
||||
this.activeTo = GetTime() + tonumber(pfUI_config.bars.hide_time)
|
||||
this.activeTo = GetTime() + timeout
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
-- [ Disable Autohide ] --
|
||||
-- 'frame' the frame that should get the autohide removed
|
||||
function pfUI.api.DisableAutohide(frame)
|
||||
if not frame then return end
|
||||
if not frame.hover then return end
|
||||
|
||||
frame.hover:UnregisterAllEvents()
|
||||
frame.hover:SetScript("OnUpdate", nil)
|
||||
frame.hover:Hide()
|
||||
frame:SetAlpha(1)
|
||||
end
|
||||
|
||||
-- [ GetColoredTime ] --
|
||||
-- 'remaining' the time in seconds that should be converted
|
||||
-- return a colored string including a time unit (m/h/d)
|
||||
|
||||
+180
-23
@@ -668,32 +668,66 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "hitindicatorsize", "15")
|
||||
pfUI:UpdateConfig("unitframes", "fallback", "hitindicatorfont", "Interface\\AddOns\\pfUI\\fonts\\Continuum.ttf")
|
||||
|
||||
pfUI:UpdateConfig("bars", nil, "icon_size", "20")
|
||||
pfUI:UpdateConfig("bars", nil, "background", "1")
|
||||
pfUI:UpdateConfig("bars", "bar1", "pageable", "1")
|
||||
pfUI:UpdateConfig("bars", "bar2", "pageable", "1")
|
||||
|
||||
pfUI:UpdateConfig("bars", "bar1", "enable", "1")
|
||||
pfUI:UpdateConfig("bars", "bar3", "enable", "1")
|
||||
pfUI:UpdateConfig("bars", "bar4", "enable", "1")
|
||||
pfUI:UpdateConfig("bars", "bar5", "enable", "1")
|
||||
pfUI:UpdateConfig("bars", "bar6", "enable", "1")
|
||||
pfUI:UpdateConfig("bars", "bar11", "enable", "1")
|
||||
pfUI:UpdateConfig("bars", "bar12", "enable", "1")
|
||||
|
||||
pfUI:UpdateConfig("bars", "bar3", "formfactor", "6 x 2")
|
||||
pfUI:UpdateConfig("bars", "bar5", "formfactor", "6 x 2")
|
||||
pfUI:UpdateConfig("bars", "bar4", "formfactor", "1 x 12")
|
||||
pfUI:UpdateConfig("bars", "bar11", "formfactor", "10 x 1")
|
||||
pfUI:UpdateConfig("bars", "bar12", "formfactor", "10 x 1")
|
||||
|
||||
pfUI:UpdateConfig("bars", "bar11", "icon_size", "18")
|
||||
pfUI:UpdateConfig("bars", "bar12", "icon_size", "18")
|
||||
|
||||
for i=1,12 do
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "enable", "0")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "pageable", "0")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "icon_size", "20")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "formfactor", "12 x 1")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "background", "1")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "showempty", "1")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "showmacro", "1")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "showkeybind", "1")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "showcount", "1")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "autohide", "0")
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "hide_time", "3")
|
||||
if i ~= 11 and i ~= 12 then
|
||||
pfUI:UpdateConfig("bars", "bar"..i, "buttons", "12")
|
||||
end
|
||||
end
|
||||
|
||||
pfUI:UpdateConfig("bars", nil, "keydown", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "altself", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "animation", "zoomfade")
|
||||
pfUI:UpdateConfig("bars", nil, "hunterbar", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "pagemaster", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "showcastable", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "glowrange", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "rangecolor", "1,0.1,0.1,1")
|
||||
pfUI:UpdateConfig("bars", nil, "showmacro", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "showkeybind", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "showoom", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "oomcolor", ".2,.2,1,1")
|
||||
pfUI:UpdateConfig("bars", nil, "showna", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "nacolor", ".3,.3,.3,1")
|
||||
pfUI:UpdateConfig("bars", nil, "showequipped", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "hunterbar", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "keydown", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "pagemaster", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "showcastable", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "hide_time", "1")
|
||||
pfUI:UpdateConfig("bars", nil, "hide_actionmain", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "hide_bottomleft", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "hide_bottomright", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "hide_right", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "hide_tworight", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "hide_shapeshift", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "hide_pet", "0")
|
||||
pfUI:UpdateConfig("bars", "actionmain", "formfactor", "12 x 1")
|
||||
pfUI:UpdateConfig("bars", "bottomleft", "formfactor", "12 x 1")
|
||||
pfUI:UpdateConfig("bars", "bottomright", "formfactor", "6 x 2")
|
||||
pfUI:UpdateConfig("bars", "right", "formfactor", "6 x 2")
|
||||
pfUI:UpdateConfig("bars", "tworight", "formfactor", "1 x 12")
|
||||
pfUI:UpdateConfig("bars", "shapeshift", "formfactor", "10 x 1")
|
||||
pfUI:UpdateConfig("bars", "pet", "formfactor", "10 x 1")
|
||||
pfUI:UpdateConfig("bars", nil, "eqcolor", ".2,.8,.2,.2")
|
||||
|
||||
pfUI:UpdateConfig("bars", nil, "font", "Interface\\AddOns\\pfUI\\fonts\\BigNoodleTitling.ttf")
|
||||
pfUI:UpdateConfig("bars", nil, "font_offset", "0")
|
||||
pfUI:UpdateConfig("bars", nil, "macro_size", "9")
|
||||
pfUI:UpdateConfig("bars", nil, "macro_color", "1,1,1,1")
|
||||
pfUI:UpdateConfig("bars", nil, "count_size", "11")
|
||||
pfUI:UpdateConfig("bars", nil, "count_color", ".2,1,.8,1")
|
||||
pfUI:UpdateConfig("bars", nil, "bind_size", "9")
|
||||
pfUI:UpdateConfig("bars", nil, "bind_color", "1,1,0,1")
|
||||
|
||||
pfUI:UpdateConfig("panel", nil, "use_unitfonts", "0")
|
||||
pfUI:UpdateConfig("panel", nil, "hide_leftchat", "0")
|
||||
@@ -797,6 +831,8 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("thirdparty", "sortbags", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "mrplow", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "flightmap", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "theorycraft", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "supermacro", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "atlasloot", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "myroleplay", "enable", "1")
|
||||
pfUI:UpdateConfig("thirdparty", "druidmana", "enable", "1")
|
||||
@@ -1028,5 +1064,126 @@ function pfUI:MigrateConfig()
|
||||
end
|
||||
end
|
||||
|
||||
-- migrating actionbar settings (> 3.18)
|
||||
if checkversion(3, 18, 0) then
|
||||
|
||||
local migratebars = {
|
||||
["pfBarActionMain"] = "pfActionBarMain",
|
||||
["pfBarBottomLeft"] = "pfActionBarTop",
|
||||
["pfBarBottomRight"] = "pfActionBarLeft",
|
||||
["pfBarTwoRight"] = "pfActionBarVertical",
|
||||
["pfBarRight"] = "pfActionBarRight",
|
||||
["pfBarShapeshift"] = "pfActionBarStances",
|
||||
["pfBarPet"] = "pfActionBarPet",
|
||||
}
|
||||
|
||||
-- migrate bar positions and scaling
|
||||
for oldname, newname in pairs(migratebars) do
|
||||
if pfUI_config.position[oldname] then
|
||||
pfUI_config.position[newname] = pfUI.api.CopyTable(pfUI_config.position[oldname])
|
||||
pfUI_config.position[oldname] = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- migrate global settings to bar specifics
|
||||
for i=1,12 do
|
||||
if pfUI_config.bars.icon_size then
|
||||
pfUI_config.bars["bar"..i].icon_size = pfUI_config.bars.icon_size
|
||||
end
|
||||
|
||||
if pfUI_config.bars.background then
|
||||
pfUI_config.bars["bar"..i].background = pfUI_config.bars.background
|
||||
end
|
||||
|
||||
if pfUI_config.bars.showmacro then
|
||||
pfUI_config.bars["bar"..i].showmacro = pfUI_config.bars.showmacro
|
||||
end
|
||||
|
||||
if pfUI_config.bars.showkeybind then
|
||||
pfUI_config.bars["bar"..i].showkeybind = pfUI_config.bars.showkeybind
|
||||
end
|
||||
|
||||
if pfUI_config.bars.hide_time then
|
||||
pfUI_config.bars["bar"..i].hide_time = pfUI_config.bars.hide_time
|
||||
end
|
||||
end
|
||||
|
||||
pfUI_config.bars.icon_size = nil
|
||||
pfUI_config.bars.background = nil
|
||||
pfUI_config.bars.showmacro = nil
|
||||
pfUI_config.bars.showkeybind = nil
|
||||
pfUI_config.bars.hide_time = nil
|
||||
|
||||
if pfUI_config.bars.hide_actionmain then
|
||||
pfUI_config.bars.bar1.autohide = pfUI_config.bars.hide_actionmain
|
||||
pfUI_config.bars.hide_actionmain = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.hide_bottomleft then
|
||||
pfUI_config.bars.bar6.autohide = pfUI_config.bars.hide_bottomleft
|
||||
pfUI_config.bars.hide_bottomleft = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.hide_bottomright then
|
||||
pfUI_config.bars.bar5.autohide = pfUI_config.bars.hide_bottomright
|
||||
pfUI_config.bars.hide_bottomright = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.hide_right then
|
||||
pfUI_config.bars.bar3.autohide = pfUI_config.bars.hide_right
|
||||
pfUI_config.bars.hide_right = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.hide_tworight then
|
||||
pfUI_config.bars.bar4.autohide = pfUI_config.bars.hide_tworight
|
||||
pfUI_config.bars.hide_tworight = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.hide_shapeshift then
|
||||
pfUI_config.bars.bar11.autohide = pfUI_config.bars.hide_shapeshift
|
||||
pfUI_config.bars.hide_shapeshift = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.hide_pet then
|
||||
pfUI_config.bars.bar12.autohide = pfUI_config.bars.hide_pet
|
||||
pfUI_config.bars.hide_pet = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.actionmain and pfUI_config.bars.actionmain.formfactor then
|
||||
pfUI_config.bars.bar1.formfactor = pfUI_config.bars.actionmain.formfactor
|
||||
pfUI_config.bars.actionmain.formfactor = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.bottomleft and pfUI_config.bars.bottomleft.formfactor then
|
||||
pfUI_config.bars.bar6.formfactor = pfUI_config.bars.bottomleft.formfactor
|
||||
pfUI_config.bars.bottomleft.formfactor = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.bottomright and pfUI_config.bars.bottomright.formfactor then
|
||||
pfUI_config.bars.bar5.formfactor = pfUI_config.bars.bottomright.formfactor
|
||||
pfUI_config.bars.bottomright.formfactor = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.right and pfUI_config.bars.right.formfactor then
|
||||
pfUI_config.bars.bar3.formfactor = pfUI_config.bars.right.formfactor
|
||||
pfUI_config.bars.right.formfactor = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.tworight and pfUI_config.bars.tworight.formfactor then
|
||||
pfUI_config.bars.bar4.formfactor = pfUI_config.bars.tworight.formfactor
|
||||
pfUI_config.bars.tworight.formfactor = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.shapeshift and pfUI_config.bars.shapeshift.formfactor then
|
||||
pfUI_config.bars.bar11.formfactor = pfUI_config.bars.shapeshift.formfactor
|
||||
pfUI_config.bars.shapeshift.formfactor = nil
|
||||
end
|
||||
|
||||
if pfUI_config.bars.pet and pfUI_config.bars.pet.formfactor then
|
||||
pfUI_config.bars.bar12.formfactor = pfUI_config.bars.pet.formfactor
|
||||
pfUI_config.bars.pet.formfactor = nil
|
||||
end
|
||||
end
|
||||
|
||||
pfUI_config.version = pfUI.version.string
|
||||
end
|
||||
|
||||
+1028
-642
File diff suppressed because it is too large
Load Diff
+14
-12
@@ -671,30 +671,32 @@ pfUI:RegisterModule("chat", function ()
|
||||
end
|
||||
end
|
||||
|
||||
-- to make sure SHOW_MULTI_ACTIONBAR_1 is set to the real value, we need to wait.
|
||||
-- to make sure the bars are set up properly, we need to wait.
|
||||
local pfChatArrangeFrame = CreateFrame("Frame", "pfChatArrange", UIParent)
|
||||
pfChatArrangeFrame:RegisterEvent("CVAR_UPDATE")
|
||||
pfChatArrangeFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
pfChatArrangeFrame:SetScript("OnEvent", function()
|
||||
pfUI.chat.editbox:ClearAllPoints()
|
||||
|
||||
local anchor = pfUI.chat.left
|
||||
if pfUI.bars and SHOW_MULTI_ACTIONBAR_1 then
|
||||
anchor = pfUI.bars.bottomleft
|
||||
elseif pfUI.bars and pfUI.bars.actionmain:IsShown() then
|
||||
anchor = pfUI.bars.actionmain
|
||||
if pfUI.bars and pfUI.bars[6]:IsShown() then
|
||||
anchor = pfUI.bars[6]
|
||||
elseif pfUI.bars and pfUI.bars[1]:IsShown() then
|
||||
anchor = pfUI.bars[1]
|
||||
end
|
||||
|
||||
pfUI.chat.editbox:SetPoint("BOTTOMLEFT", anchor, "TOPLEFT", 0, default_border*3)
|
||||
pfUI.chat.editbox:SetPoint("BOTTOMRIGHT", anchor, "TOPRIGHT", 0, default_border*3)
|
||||
if C.chat.text.input_width ~= "0" then
|
||||
pfUI.chat.editbox:SetPoint("BOTTOM", anchor, "TOP", 0, default_border*3)
|
||||
pfUI.chat.editbox:SetWidth(C.chat.text.input_width)
|
||||
else
|
||||
pfUI.chat.editbox:SetWidth(anchor:GetWidth())
|
||||
pfUI.chat.editbox:SetPoint("BOTTOMLEFT", anchor, "TOPLEFT", 0, default_border*3)
|
||||
pfUI.chat.editbox:SetPoint("BOTTOMRIGHT", anchor, "TOPRIGHT", 0, default_border*3)
|
||||
end
|
||||
|
||||
UpdateMovable(pfUI.chat.editbox)
|
||||
end)
|
||||
|
||||
if C.chat.text.input_width == "0" then
|
||||
pfUI.chat.editbox:SetWidth(default_border*3 + C.bars.icon_size * 12 + default_border * 12) -- actionbar size
|
||||
else
|
||||
pfUI.chat.editbox:SetWidth(C.chat.text.input_width)
|
||||
end
|
||||
|
||||
ChatFrameEditBox:SetParent(pfUI.chat.editbox)
|
||||
ChatFrameEditBox:SetAllPoints(pfUI.chat.editbox)
|
||||
|
||||
+90
-45
@@ -87,6 +87,20 @@ pfUI:RegisterModule("gui", function ()
|
||||
end
|
||||
end
|
||||
|
||||
if category == "UVAR" then
|
||||
category = {}
|
||||
category[config] = _G[config]
|
||||
|
||||
local update = ufunc
|
||||
|
||||
ufunc = function()
|
||||
_G[config] = this:GetChecked() and "1" or "0"
|
||||
if update then
|
||||
update()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
frame.category = category
|
||||
frame.config = config
|
||||
|
||||
@@ -717,9 +731,17 @@ pfUI:RegisterModule("gui", function ()
|
||||
"BOTTOMRIGHT:" .. T["Bottom Right"],
|
||||
}
|
||||
|
||||
pfUI.gui.dropdowns.num_actionbar_buttons = BarLayoutOptions(NUM_ACTIONBAR_BUTTONS)
|
||||
pfUI.gui.dropdowns.num_shapeshift_slots = BarLayoutOptions(NUM_SHAPESHIFT_SLOTS)
|
||||
pfUI.gui.dropdowns.num_pet_action_slots = BarLayoutOptions(NUM_PET_ACTION_SLOTS)
|
||||
pfUI.gui.dropdowns.actionbuttonanimations = {
|
||||
"none:" .. T["None"],
|
||||
"zoomfade:" .. T["Zoom & Fade"],
|
||||
"shrinkreturn:" .. T["Shrink & Return"],
|
||||
"elasticzoom:" .. T["Elastic Zoom"],
|
||||
"wobblezoom:" .. T["Wobble Zoom"],
|
||||
}
|
||||
|
||||
pfUI.gui.dropdowns.actionbarbuttons = {
|
||||
"1","2","3","4","5","6","7","8","9","10","11","12"
|
||||
}
|
||||
|
||||
pfUI.gui.dropdowns.loot_rarity = {}
|
||||
for i=0, getn(_G.ITEM_QUALITY_COLORS)-2 do
|
||||
@@ -1236,59 +1258,80 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui.tabs.actionbar = pfUI.gui.tabs:CreateTabChild(T["Actionbar"], nil, nil, nil, true)
|
||||
pfUI.gui.tabs.actionbar.tabs = CreateTabFrame(pfUI.gui.tabs.actionbar, "TOP", true)
|
||||
|
||||
local barnames = { {11, "Stance/Shapeshift Bar"}, {12, "Pet Actionbar"}, {1, "Main Actionbar"},
|
||||
{6, "Top Actionbar"}, {5, "Left Actionbar"}, {3, "Right Actionbar"}, {4, "Vertical Actionbar"},
|
||||
{2, "Paging Actionbar"}, {7, "Special Actionbar"}, {8, "Stance Bar 1"}, {9, "Stance Bar 2"}, {10, "Stance Bar 3"} }
|
||||
|
||||
-- >> General
|
||||
pfUI.gui.tabs.actionbar.tabs.general = pfUI.gui.tabs.actionbar.tabs:CreateTabChild(T["General"], true)
|
||||
pfUI.gui.tabs.actionbar.tabs.general:SetScript("OnShow", function()
|
||||
if not this.setup then
|
||||
CreateConfig(nil, this, T["Icon Size"], C.bars, "icon_size")
|
||||
CreateConfig(nil, this, T["Enable Action Bar Backgrounds"], C.bars, "background", "checkbox")
|
||||
CreateConfig(MultiActionBar_UpdateGridVisibility, this, T["Always Show Action Bar Buttons"], "GVAR", "ALWAYS_SHOW_MULTIBARS", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Range Display On Hotkeys"], C.bars, "glowrange", "checkbox")
|
||||
CreateConfig(nil, this, T["Range Display Color"], C.bars, "rangecolor", "color")
|
||||
CreateConfig(nil, this, T["Show Macro Text"], C.bars, "showmacro", "checkbox")
|
||||
CreateConfig(nil, this, T["Show Hotkey Text"], C.bars, "showkeybind", "checkbox")
|
||||
CreateConfig(nil, this, T["Show Equipped Items"], C.bars, "showequipped", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Range Based Auto Paging (Hunter)"], C.bars, "hunterbar", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Action On Key Down"], C.bars, "keydown", "checkbox")
|
||||
CreateConfig(nil, this, T["Switch Bar On Meta Key Press"], C.bars, "pagemaster", "checkbox")
|
||||
CreateConfig(nil, this, T["Show Indicator For Castable Pet Actions"], C.bars, "showcastable", "checkbox")
|
||||
CreateConfig(update["bars"], this, T["Trigger Actions On Key Down"], C.bars, "keydown", "checkbox")
|
||||
CreateConfig(update["bars"], this, T["Alt Self Cast For All Hotkeys"], C.bars, "altself", "checkbox")
|
||||
CreateConfig(update["bars"], this, T["Button Animation"], C.bars, "animation", "dropdown", pfUI.gui.dropdowns.actionbuttonanimations)
|
||||
CreateConfig(update["bars"], this, T["Highlight Equipped Items"], C.bars, "showequipped", "checkbox")
|
||||
CreateConfig(update["bars"], this, T["Equipped Item Color"], C.bars, "eqcolor", "color")
|
||||
CreateConfig(update["bars"], this, T["Highlight Out Of Range Spells"], C.bars, "glowrange", "checkbox")
|
||||
CreateConfig(update["bars"], this, T["Out Of Range Color"], C.bars, "rangecolor", "color")
|
||||
CreateConfig(update["bars"], this, T["Highlight Out Of Mana Spells"], C.bars, "showoom", "checkbox")
|
||||
CreateConfig(update["bars"], this, T["Out Of Mana Color"], C.bars, "oomcolor", "color")
|
||||
CreateConfig(update["bars"], this, T["Highlight Not Usable Spells"], C.bars, "showna", "checkbox")
|
||||
CreateConfig(update["bars"], this, T["Not Usable Color"], C.bars, "nacolor", "color")
|
||||
CreateConfig(update["bars"], this, T["Lock Actionbars"], "UVAR", "LOCK_ACTIONBAR", "checkbox")
|
||||
|
||||
CreateConfig(nil, this, "Font Options", nil, nil, "header")
|
||||
CreateConfig(update["bars"], this, T["Font"], C.bars, "font", "dropdown", pfUI.gui.dropdowns.fonts)
|
||||
CreateConfig(update["bars"], this, T["Font Padding"], C.bars, "font_offset")
|
||||
CreateConfig(update["bars"], this, T["Macro Text Size"], C.bars, "macro_size")
|
||||
CreateConfig(update["bars"], this, T["Macro Text Color"], C.bars, "macro_color", "color")
|
||||
CreateConfig(update["bars"], this, T["Item Count Text Size"], C.bars, "count_size")
|
||||
CreateConfig(update["bars"], this, T["Item Count Text Color"], C.bars, "count_color", "color")
|
||||
CreateConfig(update["bars"], this, T["Keybind Text Size"], C.bars, "bind_size")
|
||||
CreateConfig(update["bars"], this, T["Keybind Text Color"], C.bars, "bind_color", "color")
|
||||
|
||||
CreateConfig(nil, this, "Auto Paging", nil, nil, "header")
|
||||
CreateConfig(nil, this, T["Switch Pages On Meta Key Press"], C.bars, "pagemaster", "checkbox")
|
||||
CreateConfig(nil, this, T["Range Based Hunter Paging"], C.bars, "hunterbar", "checkbox")
|
||||
this.setup = true
|
||||
end
|
||||
end)
|
||||
|
||||
-- >> Layout
|
||||
pfUI.gui.tabs.actionbar.tabs.layout = pfUI.gui.tabs.actionbar.tabs:CreateTabChild(T["Layout"], true)
|
||||
pfUI.gui.tabs.actionbar.tabs.layout:SetScript("OnShow", function()
|
||||
pfUI.gui.tabs.actionbar.tabs.bars = pfUI.gui.tabs.actionbar.tabs:CreateTabChild("Bars", true)
|
||||
pfUI.gui.tabs.actionbar.tabs.bars:SetScript("OnShow", function()
|
||||
if not this.setup then
|
||||
CreateConfig(UIParent_ManageFramePositions, this, T["Enable Second Actionbar (BottomLeft)"], "GVAR", "SHOW_MULTI_ACTIONBAR_1", "checkbox")
|
||||
CreateConfig(UIParent_ManageFramePositions, this, T["Enable Left Actionbar (BottomRight)"], "GVAR", "SHOW_MULTI_ACTIONBAR_2", "checkbox")
|
||||
CreateConfig(UIParent_ManageFramePositions, this, T["Enable Right Actionbar (Right)"], "GVAR", "SHOW_MULTI_ACTIONBAR_3", "checkbox")
|
||||
CreateConfig(UIParent_ManageFramePositions, this, T["Enable Vertical Actionbar (TwoRight)"], "GVAR", "SHOW_MULTI_ACTIONBAR_4", "checkbox")
|
||||
for _, data in pairs(barnames) do
|
||||
local id, caption = data[1], data[2]
|
||||
local formfactors = BarLayoutOptions(id < 11 and NUM_ACTIONBAR_BUTTONS or id > 11 and NUM_SHAPESHIFT_SLOTS or NUM_PET_ACTION_SLOTS)
|
||||
CreateConfig(update[c], this, caption, nil, nil, "header")
|
||||
CreateConfig(update["bars"], this, T["Enable"], C.bars["bar"..id], "enable", "checkbox")
|
||||
|
||||
CreateConfig(update[c], this, T["Form Factor"], nil, nil, "header")
|
||||
CreateConfig(nil, this, T["Main Actionbar (ActionMain)"], C.bars.actionmain, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons)
|
||||
CreateConfig(nil, this, T["Second Actionbar (BottomLeft)"], C.bars.bottomleft, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons)
|
||||
CreateConfig(nil, this, T["Left Actionbar (BottomRight)"], C.bars.bottomright, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons)
|
||||
CreateConfig(nil, this, T["Right Actionbar (Right)"], C.bars.right, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons)
|
||||
CreateConfig(nil, this, T["Vertical Actionbar (TwoRight)"], C.bars.tworight, "formfactor", "dropdown", pfUI.gui.dropdowns.num_actionbar_buttons)
|
||||
CreateConfig(nil, this, T["Shapeshift Bar (BarShapeShift)"], C.bars.shapeshift, "formfactor", "dropdown", pfUI.gui.dropdowns.num_shapeshift_slots)
|
||||
CreateConfig(nil, this, T["Pet Bar (BarPet)"], C.bars.pet, "formfactor", "dropdown", pfUI.gui.dropdowns.num_pet_action_slots)
|
||||
this.setup = true
|
||||
end
|
||||
end)
|
||||
if id ~= 11 and id ~= 12 then
|
||||
CreateConfig(update["bars"], this, T["Buttons"], C.bars["bar"..id], "buttons", "dropdown", pfUI.gui.dropdowns.actionbarbuttons)
|
||||
|
||||
-- >> Autohide
|
||||
pfUI.gui.tabs.actionbar.tabs.autohide = pfUI.gui.tabs.actionbar.tabs:CreateTabChild(T["Autohide"], true)
|
||||
pfUI.gui.tabs.actionbar.tabs.autohide:SetScript("OnShow", function()
|
||||
if not this.setup then
|
||||
CreateConfig(nil, this, T["Seconds Until Action Bars Autohide"], C.bars, "hide_time")
|
||||
CreateConfig(nil, this, T["Enable Autohide For BarActionMain"], C.bars, "hide_actionmain", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Autohide For BarBottomLeft"], C.bars, "hide_bottomleft", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Autohide For BarBottomRight"], C.bars, "hide_bottomright", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Autohide For BarRight"], C.bars, "hide_right", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Autohide For BarTwoRight"], C.bars, "hide_tworight", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Autohide For BarShapeShift"], C.bars, "hide_shapeshift", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Autohide For BarPet"], C.bars, "hide_pet", "checkbox")
|
||||
if id ~= 1 then
|
||||
CreateConfig(update["bars"], this, T["Pageable"], C.bars["bar"..id], "pageable", "checkbox")
|
||||
end
|
||||
end
|
||||
|
||||
if id == 12 then
|
||||
CreateConfig(update["bars"], this, T["Auto-Castable Action Indicator"], C.bars, "showcastable", "checkbox")
|
||||
end
|
||||
|
||||
CreateConfig(update["bars"], this, T["Icon Size"], C.bars["bar"..id], "icon_size")
|
||||
CreateConfig(update["bars"], this, T["Layout"], C.bars["bar"..id], "formfactor", "dropdown", formfactors)
|
||||
CreateConfig(update["bars"], this, T["Bar Background"], C.bars["bar"..id], "background", "checkbox")
|
||||
CreateConfig(update["bars"], this, T["Show Hotkey Text"], C.bars["bar"..id], "showkeybind", "checkbox")
|
||||
|
||||
if id ~= 11 and id ~= 12 then
|
||||
CreateConfig(update["bars"], this, T["Show Macro Text"], C.bars["bar"..id], "showmacro", "checkbox")
|
||||
CreateConfig(update["bars"], this, T["Show Item Count Text"], C.bars["bar"..id], "showcount", "checkbox")
|
||||
elseif id ~= 11 then
|
||||
CreateConfig(update["bars"], this, T["Show Empty Buttons"], C.bars["bar"..id], "showempty", "checkbox")
|
||||
end
|
||||
|
||||
CreateConfig(update["bars"], this, T["Enable Autohide"], C.bars["bar"..id], "autohide", "checkbox")
|
||||
CreateConfig(update["bars"], this, T["Autohide Timeout"], C.bars["bar"..id], "hide_time")
|
||||
end
|
||||
this.setup = true
|
||||
end
|
||||
end)
|
||||
@@ -1477,6 +1520,8 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(nil, this, "SortBags", C.thirdparty.sortbags, "enable", "checkbox")
|
||||
CreateConfig(nil, this, "MrPlow", C.thirdparty.mrplow, "enable", "checkbox")
|
||||
CreateConfig(nil, this, "FlightMap", C.thirdparty.flightmap, "enable", "checkbox")
|
||||
CreateConfig(nil, this, "TheoryCraft", C.thirdparty.theorycraft, "enable", "checkbox")
|
||||
CreateConfig(nil, this, "SuperMacro", C.thirdparty.supermacro, "enable", "checkbox")
|
||||
CreateConfig(nil, this, "AtlasLoot", C.thirdparty.atlasloot, "enable", "checkbox")
|
||||
CreateConfig(nil, this, "MyRolePlay", C.thirdparty.myroleplay, "enable", "checkbox")
|
||||
CreateConfig(nil, this, "DruidManaBar", C.thirdparty.druidmana, "enable", "checkbox")
|
||||
|
||||
+22
-9
@@ -1,14 +1,23 @@
|
||||
pfUI:RegisterModule("hoverbind", function ()
|
||||
local default_border = C.appearance.border.default
|
||||
local keymap = {
|
||||
["BonusActionButton"] = "ACTIONBUTTON",
|
||||
["MultiBarBottomLeftButton"] = "MULTIACTIONBAR1BUTTON",
|
||||
["MultiBarBottomRightButton"] = "MULTIACTIONBAR2BUTTON",
|
||||
["MultiBarRightButton"] = "MULTIACTIONBAR3BUTTON",
|
||||
["MultiBarLeftButton"] = "MULTIACTIONBAR4BUTTON",
|
||||
["ShapeshiftButton"] = "SHAPESHIFTBUTTON",
|
||||
["PetActionButton"] = "BONUSACTIONBUTTON",
|
||||
-- buttons to binding association
|
||||
["pfActionBarMainButton"] = "ACTIONBUTTON",
|
||||
["pfActionBarTopButton"] = "MULTIACTIONBAR1BUTTON",
|
||||
["pfActionBarLeftButton"] = "MULTIACTIONBAR2BUTTON",
|
||||
["pfActionBarRightButton"] = "MULTIACTIONBAR3BUTTON",
|
||||
["pfActionBarVerticalButton"] = "MULTIACTIONBAR4BUTTON",
|
||||
["pfActionBarStancesButton"] = "SHAPESHIFTBUTTON",
|
||||
["pfActionBarPetButton"] = "BONUSACTIONBUTTON",
|
||||
|
||||
-- special buttons
|
||||
["pfActionBarPagingButton"] = "PFPAGING",
|
||||
["pfActionBarSpecialButton"] = "PFSPECIAL",
|
||||
["pfActionBarStancePaging1Button"] = "PFSTANCEONE",
|
||||
["pfActionBarStancePaging2Button"] = "PFSTANCETWO",
|
||||
["pfActionBarStancePaging3Button"] = "PFSTANCETHREE",
|
||||
}
|
||||
|
||||
local modifiers = {
|
||||
["ALT"] = "ALT-",
|
||||
["CTRL"] = "CTRL-",
|
||||
@@ -54,7 +63,9 @@ pfUI:RegisterModule("hoverbind", function ()
|
||||
local hovername = (frame and frame.GetName) and (frame:GetName()) or ""
|
||||
local binding = pfUI.hoverbind:GetBinding(hovername)
|
||||
if arg1 == "ESCAPE" and not binding then pfUI.hoverbind:Hide() return end
|
||||
if (binding) then
|
||||
if binding == "NOBIND" then
|
||||
UIErrorsFrame:AddMessage(T["Keybinding failed due to client restrictions."], 1, .2, .2)
|
||||
elseif binding then
|
||||
if arg1 == "ESCAPE" then
|
||||
local key = (GetBindingKey(binding))
|
||||
if (key) then
|
||||
@@ -77,7 +88,9 @@ pfUI:RegisterModule("hoverbind", function ()
|
||||
function pfUI.hoverbind:GetBinding(button_name)
|
||||
local found,_,buttontype,buttonindex = string.find(button_name,"^(%a+)(%d+)$")
|
||||
if found then
|
||||
if keymap[buttontype] then
|
||||
if keymap[buttontype] and keymap[buttontype] == "NOBIND" then
|
||||
return "NOBIND"
|
||||
elseif keymap[buttontype] then
|
||||
return string.format("%s%d",keymap[buttontype],buttonindex)
|
||||
elseif buttontype == "ActionButton" then
|
||||
return string.format("ACTIONBUTTON%d",buttonindex)
|
||||
|
||||
+4
-4
@@ -715,16 +715,16 @@ pfUI:RegisterModule("panel", function()
|
||||
pfUI.panel.autohide:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
pfUI.panel.autohide:SetScript("OnEvent", function()
|
||||
if C.panel.hide_leftchat == "1" then
|
||||
CreateAutohide(pfUI.panel.left)
|
||||
EnableAutohide(pfUI.panel.left, 2)
|
||||
end
|
||||
if C.panel.hide_rightchat == "1" then
|
||||
CreateAutohide(pfUI.panel.right)
|
||||
EnableAutohide(pfUI.panel.right, 2)
|
||||
end
|
||||
if C.panel.hide_minimap == "1" then
|
||||
CreateAutohide(pfUI.panel.minimap)
|
||||
EnableAutohide(pfUI.panel.minimap, 2)
|
||||
end
|
||||
if C.panel.hide_microbar == "1" then
|
||||
CreateAutohide(pfUI.panel.microbutton)
|
||||
EnableAutohide(pfUI.panel.microbutton, 2)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -666,6 +666,72 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
FlightMapTimesText:SetFont(pfUI.font_default, 12, "OUTLINE")
|
||||
end)
|
||||
|
||||
HookAddonOrVariable("TheoryCraft_SetUpButton", function()
|
||||
if C.thirdparty.theorycraft.enable == "0" then return end
|
||||
|
||||
-- set pfUI bar font
|
||||
if TheoryCraft_Settings then
|
||||
TheoryCraft_Settings["FontPath"] = C.bars.font
|
||||
end
|
||||
|
||||
if not pfUI.bars then return end
|
||||
|
||||
-- make theorycraft aware of pfUI bars
|
||||
for i=1,10 do
|
||||
for j=1,10 do
|
||||
TheoryCraft_SetUpButton(pfUI.bars[i][j]:GetName(), "Normal")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
HookAddonOrVariable("SM_GetActionSpell", function()
|
||||
if C.thirdparty.supermacro.enable == "0" then return end
|
||||
if not pfUI.bars then return end
|
||||
|
||||
-- refresh super macro texture
|
||||
local function SMRefresh()
|
||||
local slot = this:GetID()
|
||||
local text = GetActionText(slot)
|
||||
|
||||
if text then
|
||||
if _G.SM_ACTION_SPELL and _G.SM_ACTION_SPELL["regular"] and _G.SM_ACTION_SPELL["regular"][text] then
|
||||
this.icon:SetTexture(_G.SM_ACTION_SPELL["regular"][text].texture)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- hook events to include SuperMacro refreshs
|
||||
local ButtonEvent = pfUI.bars[1][1]:GetScript("OnEvent")
|
||||
local function NewButtonEvent()
|
||||
ButtonEvent()
|
||||
SMRefresh()
|
||||
end
|
||||
|
||||
-- hook events to include SuperMacro refreshs
|
||||
local ButtonEnter = pfUI.bars[1][1]:GetScript("OnEnter")
|
||||
local function NewButtonEnter()
|
||||
ButtonEnter()
|
||||
SM_ActionButton_SetTooltip()
|
||||
end
|
||||
|
||||
-- reassign the new event handler
|
||||
for i=1,10 do
|
||||
for j=1,12 do
|
||||
pfUI.bars[i][j]:SetScript("OnEvent", NewButtonEvent)
|
||||
pfUI.bars[i][j]:SetScript("OnEnter", NewButtonEnter)
|
||||
end
|
||||
end
|
||||
|
||||
-- trigger the event whenever SuperMacro got an update
|
||||
hooksecurefunc("SM_UpdateActionSpell", function()
|
||||
for i=1,10 do
|
||||
for j=1,12 do
|
||||
pfUI.bars[i][j].forceupdate = true
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
HookAddonOrVariable("AtlasLoot", function()
|
||||
if C.thirdparty.atlasloot.enable == "0" then return end
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
## Title: |cff33ffccpf|cffffffffUI
|
||||
## Author: Shagu
|
||||
## Notes: A complete user interface replacement.
|
||||
## Version: 3.18
|
||||
## Version: 3.19
|
||||
## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache
|
||||
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB
|
||||
|
||||
|
||||
Reference in New Issue
Block a user