mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-11 08:00:01 +00:00
+7
-7
@@ -25,7 +25,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
ufunc = function()
|
||||
for _, fr in ipairs(pfUI.uf.frames) do
|
||||
if fr.label == key then
|
||||
pfUI.uf.UpdateConfig(fr)
|
||||
fr:UpdateConfig()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2392,16 +2392,16 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
CreateConfig(U[c], T["Focus Color"], C.unitframes[c], "focuscolor", "color")
|
||||
|
||||
if c == "player" then
|
||||
CreateConfig(U[c], T["Player SP/Haste Display"], nil, nil, "header")
|
||||
CreateConfig(U[c], T["Haste Display"], C.unitframes[c], "display_haste", "dropdown", {
|
||||
CreateConfig(nil, T["Player SP/Haste Display"], nil, nil, "header")
|
||||
CreateConfig(nil, T["Haste Display"], C.unitframes[c], "display_haste", "dropdown", {
|
||||
"0:"..T["None"],
|
||||
"1:"..T["Haste (cast speed increase)"],
|
||||
"2:"..T["Effective Haste (Haste * cast time reduction)"], -- Only affects mages/warlocks I believe
|
||||
})
|
||||
CreateConfig(U[c], T["Haste Display Color"], C.unitframes[c], "display_haste_color", "color")
|
||||
CreateConfig(U[c], T["Display Spell Power"], C.unitframes[c], "display_spellpower", "checkbox")
|
||||
CreateConfig(U[c], T["Use Custom Spell Power Color (unchecked = biggest school color)"], C.unitframes[c], "display_sp_color_override", "checkbox")
|
||||
CreateConfig(U[c], T["Spell Power Color"], C.unitframes[c], "display_sp_color", "color")
|
||||
CreateConfig(nil, T["Haste Display Color"], C.unitframes[c], "display_haste_color", "color")
|
||||
CreateConfig(nil, T["Display Spell Power"], C.unitframes[c], "display_spellpower", "checkbox")
|
||||
CreateConfig(nil, T["Use Custom Spell Power Color (unchecked = biggest school color)"], C.unitframes[c], "display_sp_color_override", "checkbox")
|
||||
CreateConfig(nil, T["Spell Power Color"], C.unitframes[c], "display_sp_color", "color")
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
+23
-3
@@ -1,12 +1,24 @@
|
||||
pfUI:RegisterModule("macrotweak", "vanilla", function ()
|
||||
-- disable macrotweak when macro addons are loaded
|
||||
if IsAddOnLoaded("Supermacro") or IsAddOnLoaded("SuperCleveRoidMacros") or IsAddOnLoaded("UltimaMacros") then return end
|
||||
local conflictAddons = { "Supermacro", "SuperCleveRoidMacros", "UltimaMacros" }
|
||||
local disabled = false
|
||||
|
||||
local function CheckConflicts()
|
||||
for _, name in pairs(conflictAddons) do
|
||||
if IsAddOnLoaded(name) then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpfUI|r: " .. name .. " found, macrotweak disabled.")
|
||||
disabled = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- do not write macro calls into chat input history
|
||||
if ChatFrameEditBox._AddHistoryLine then
|
||||
local userinput
|
||||
ChatFrameEditBox._AddHistoryLine = ChatFrameEditBox.AddHistoryLine
|
||||
ChatFrameEditBox.AddHistoryLine = function(self, text)
|
||||
if disabled then return ChatFrameEditBox._AddHistoryLine(self, text) end
|
||||
if not userinput and text and string.find(text, "^/run(.+)") then return end
|
||||
if not userinput and string.find(text, "^/script(.+)") then return end
|
||||
if not userinput and string.find(text, "^/cast(.+)") then return end
|
||||
@@ -24,6 +36,7 @@ pfUI:RegisterModule("macrotweak", "vanilla", function ()
|
||||
-- make sure #showtooltip inside macros won't be sent
|
||||
local hookSendChatMessage = SendChatMessage
|
||||
function _G.SendChatMessage(msg, ...)
|
||||
if disabled then return hookSendChatMessage(msg, unpack(arg)) end
|
||||
if msg and string.find(msg, "^#showtooltip ") then return end
|
||||
hookSendChatMessage(msg, unpack(arg))
|
||||
end
|
||||
@@ -51,4 +64,11 @@ pfUI:RegisterModule("macrotweak", "vanilla", function ()
|
||||
UseInventoryItem(slot)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
-- Check conflicts after one tick so all addons have finished loading
|
||||
local watcher = CreateFrame("Frame")
|
||||
watcher:SetScript("OnUpdate", function()
|
||||
this:SetScript("OnUpdate", nil)
|
||||
CheckConflicts()
|
||||
end)
|
||||
end)
|
||||
@@ -142,7 +142,11 @@ pfUI:RegisterModule("player", "vanilla:tbc", function ()
|
||||
playerFrame.infoTopCenterText:SetText(text)
|
||||
end
|
||||
|
||||
-- Keep a reference to the generic UF UpdateConfig so we can chain it
|
||||
local genericUpdateConfig = pfUI.uf.UpdateConfig
|
||||
|
||||
function playerFrame:UpdateConfig()
|
||||
genericUpdateConfig(self)
|
||||
UpdateInfoText()
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user