mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-23 08:06:55 +00:00
performance update
performance update
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
github: [shagu]
|
||||
ko_fi: shagu
|
||||
@@ -0,0 +1,24 @@
|
||||
name: Close inactive issues
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "30 1 * * *"
|
||||
|
||||
jobs:
|
||||
close-issues:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@v5
|
||||
with:
|
||||
operations-per-run: 100
|
||||
days-before-issue-stale: 30
|
||||
days-before-issue-close: 14
|
||||
stale-issue-label: "stale"
|
||||
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
|
||||
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
|
||||
days-before-pr-stale: -1
|
||||
days-before-pr-close: -1
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,6 +1,8 @@
|
||||
-- load pfUI environment
|
||||
setfenv(1, pfUI:GetEnvironment())
|
||||
|
||||
local superwow_active = HasSuperWoW()
|
||||
|
||||
pfUI.uf = CreateFrame("Frame", nil, UIParent)
|
||||
pfUI.uf:SetScript("OnUpdate", function()
|
||||
if InCombatLockdown and not InCombatLockdown() then
|
||||
|
||||
+1960
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,8 @@
|
||||
-- load pfUI environment
|
||||
setfenv(1, pfUI:GetEnvironment())
|
||||
|
||||
local superwow_active = HasSuperWoW()
|
||||
|
||||
--[[ librange ]]--
|
||||
-- A pfUI library that detects and caches distance to units.
|
||||
--
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
pfUI:RegisterModule("castbar", "vanilla", function ()
|
||||
local superwow_active = HasSuperWoW()
|
||||
|
||||
local font = C.castbar.use_unitfonts == "1" and pfUI.font_unit or pfUI.font_default
|
||||
local font_size = C.castbar.use_unitfonts == "1" and C.global.font_unit_size or C.global.font_size
|
||||
local rawborder, default_border = GetBorderSize("unitframes")
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
pfUI:RegisterModule("combatlogfix", "tbc", function ()
|
||||
-- Fixes the combatlog break bugs that exist since patch 2.4 by simply clearing the whole log
|
||||
-- on every update. This is required in order to receive new log events. Otherwise, addons like
|
||||
-- Omen or Recount won't work and simply don't receive any new data at a given time.
|
||||
local combatlog = CreateFrame("Frame", "pfCombatLogFix", UIParent)
|
||||
combatlog:SetScript("OnUpdate", CombatLogClearEntries)
|
||||
end)
|
||||
@@ -2,6 +2,9 @@ pfUI:RegisterModule("nameplates", "vanilla", function ()
|
||||
-- disable original castbars
|
||||
pcall(SetCVar, "ShowVKeyCastbar", 0)
|
||||
|
||||
-- check for SuperWoW support
|
||||
local superwow_active = HasSuperWoW()
|
||||
|
||||
local unitcolors = {
|
||||
["ENEMY_NPC"] = { .9, .2, .3, .8 },
|
||||
["NEUTRAL_NPC"] = { 1, 1, .3, .8 },
|
||||
|
||||
@@ -0,0 +1,381 @@
|
||||
pfUI:RegisterModule("thirdparty-tbc", "tbc", function ()
|
||||
-- abort when thirdparty core module is not loaded
|
||||
if not pfUI.thirdparty then return end
|
||||
local rawborder, default_border = GetBorderSize()
|
||||
|
||||
HookAddonOrVariable("Omen", function()
|
||||
local docktable = { "omen", "Omen", "OmenBarList",
|
||||
function() -- single
|
||||
Omen.BarList:ClearAllPoints()
|
||||
Omen.BarList:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", -5, 5)
|
||||
Omen.BarList:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 5, pfUI.panel.right:GetHeight()-5)
|
||||
Omen.BarList:SetWidth(pfUI.chat.right:GetWidth() + 7)
|
||||
|
||||
-- backdrop adjustments
|
||||
if Omen.BarList.backdrop then
|
||||
Omen.BarList.backdrop:SetPoint("TOPLEFT", -default_border+5, default_border-5)
|
||||
Omen.BarList.backdrop:SetPoint("BOTTOMRIGHT", default_border-5, -18-default_border+5)
|
||||
end
|
||||
end,
|
||||
function() -- dual
|
||||
Omen.BarList:ClearAllPoints()
|
||||
Omen.BarList:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", -5, 5)
|
||||
Omen.BarList:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOM", -default_border+5, pfUI.panel.right:GetHeight()-5)
|
||||
Omen.BarList:SetWidth(pfUI.chat.right:GetWidth() / 2 + 7)
|
||||
|
||||
-- backdrop adjustments
|
||||
if Omen.BarList.backdrop then
|
||||
Omen.BarList.backdrop:SetPoint("TOPLEFT", -default_border+5, default_border-5)
|
||||
Omen.BarList.backdrop:SetPoint("BOTTOMRIGHT", default_border-5, -18-default_border+5)
|
||||
end
|
||||
end,
|
||||
function() -- show
|
||||
Omen:UpdateDisplay()
|
||||
Omen:EnableLastModule()
|
||||
Omen:LayoutModuleIcons()
|
||||
|
||||
Omen.ModuleList:SetPoint("BOTTOMLEFT", Omen.BarList, "TOPLEFT", 5, default_border*3-5)
|
||||
Omen.ModuleList:SetPoint("BOTTOMRIGHT", Omen.BarList, "TOPRIGHT", -5, default_border*3)
|
||||
|
||||
-- fake sizes to retain proper button sizes
|
||||
Omen.ModuleList._GetHeight = Omen.ModuleList._GetHeight or Omen.ModuleList.GetHeight
|
||||
Omen.ModuleList.GetHeight = function() return 30 end
|
||||
Omen:LayoutModuleIcons()
|
||||
Omen.ModuleList.GetHeight = Omen.ModuleList._GetHeight
|
||||
Omen.ModuleList:SetHeight(20)
|
||||
|
||||
OmenResizeGrip:Hide()
|
||||
Omen:Toggle(true)
|
||||
end,
|
||||
function() -- hide
|
||||
Omen:Toggle(nil)
|
||||
end,
|
||||
function() -- once
|
||||
Omen.Title:Hide()
|
||||
Omen.Title.Show = function() return end
|
||||
EnableAutohide(Omen.ModuleList, 1)
|
||||
|
||||
local hookUpdateDisplay = Omen.UpdateDisplay
|
||||
Omen.UpdateDisplay = function(self)
|
||||
hookUpdateDisplay(self)
|
||||
pfUI.thirdparty.meters:Resize()
|
||||
end
|
||||
|
||||
Omen.UpdateVisible = function()
|
||||
if pfUI.thirdparty.meters.state then
|
||||
Omen.Anchor:Show()
|
||||
else
|
||||
Omen.Anchor:Hide()
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
pfUI.thirdparty.meters:RegisterMeter("threat", docktable)
|
||||
|
||||
if C.thirdparty.omen.skin == "1" then
|
||||
if Omen.Anchor then
|
||||
|
||||
local hookUpdateDisplay = Omen.UpdateDisplay
|
||||
Omen.UpdateDisplay = function(self)
|
||||
hookUpdateDisplay(self)
|
||||
|
||||
StripTextures(Omen.Title)
|
||||
StripTextures(Omen.ModuleList)
|
||||
StripTextures(Omen.BarList)
|
||||
|
||||
if not Omen.Title.backdrop or not Omen.ModuleList.backdrop or not Omen.BarList.backdrop then
|
||||
CreateBackdrop(Omen.Title, nil, nil, (C.thirdparty.chatbg == "1" and .8))
|
||||
CreateBackdropShadow(Omen.Title)
|
||||
|
||||
CreateBackdrop(Omen.ModuleList, nil, nil, (C.thirdparty.chatbg == "1" and .8))
|
||||
CreateBackdropShadow(Omen.ModuleList)
|
||||
|
||||
CreateBackdrop(Omen.BarList, nil, nil, (C.thirdparty.chatbg == "1" and .8))
|
||||
CreateBackdropShadow(Omen.BarList)
|
||||
end
|
||||
|
||||
if C.thirdparty.chatbg == "1" and C.chat.global.custombg == "1" then
|
||||
local r, g, b, a = strsplit(",", C.chat.global.background)
|
||||
Omen.BarList.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
|
||||
Omen.ModuleList.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
|
||||
|
||||
local r, g, b, a = strsplit(",", C.chat.global.border)
|
||||
Omen.BarList.backdrop:SetBackdropBorderColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
|
||||
Omen.ModuleList.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
|
||||
end
|
||||
end
|
||||
|
||||
HookScript(Omen.Anchor, "OnShow", function()
|
||||
for i, child in pairs({ OmenModuleButtons:GetChildren() }) do
|
||||
if child and child:IsObjectType("Button") then
|
||||
child:GetNormalTexture():SetTexCoord(.08, .92, .08, .92)
|
||||
CreateBackdrop(child, nil, true)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
Omen:UpdateDisplay()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
HookAddonOrVariable("Recount", function()
|
||||
local docktable = { "recount", "Recount", "Recount_MainWindow",
|
||||
function() -- single
|
||||
Recount.MainWindow:ClearAllPoints()
|
||||
Recount.MainWindow:SetPoint("TOPLEFT", pfUI.chat.right, "TOPLEFT", 0, 10)
|
||||
Recount.MainWindow:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, 18)
|
||||
Recount.MainWindow:SetWidth(pfUI.chat.right:GetWidth())
|
||||
end,
|
||||
function() -- dual
|
||||
Recount.MainWindow:ClearAllPoints()
|
||||
Recount.MainWindow:SetPoint("TOPLEFT", pfUI.chat.right, "TOP", default_border, 10)
|
||||
Recount.MainWindow:SetPoint("BOTTOMRIGHT", pfUI.chat.right, "BOTTOMRIGHT", 0, 18)
|
||||
Recount.MainWindow:SetWidth(pfUI.chat.right:GetWidth() / 2)
|
||||
end,
|
||||
function() -- show
|
||||
Recount.MainWindow:Show()
|
||||
Recount:ResizeMainWindow()
|
||||
Recount:RefreshMainWindow()
|
||||
end,
|
||||
function() -- hide
|
||||
Recount.MainWindow:Hide()
|
||||
end,
|
||||
function() -- once
|
||||
local hookResize = Recount.ResizeMainWindow
|
||||
Recount.ResizeMainWindow = function()
|
||||
hookResize()
|
||||
|
||||
local a, b, c = Recount.MainWindow:GetPoint()
|
||||
if b == pfUI.chat.right and Recount.MainWindow.backdrop then
|
||||
Recount.MainWindow.backdrop:SetPoint("BOTTOMRIGHT", default_border, -18-default_border)
|
||||
else
|
||||
Recount.MainWindow.backdrop:SetPoint("BOTTOMRIGHT", default_border, default_border)
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
pfUI.thirdparty.meters:RegisterMeter("damage", docktable)
|
||||
|
||||
if C.thirdparty.recount.skin == "1" then
|
||||
if Recount_MainWindow then
|
||||
StripTextures(Recount.MainWindow)
|
||||
CreateBackdrop(Recount.MainWindow, nil, nil, (C.thirdparty.chatbg == "1" and .8))
|
||||
CreateBackdropShadow(Recount.MainWindow)
|
||||
SkinScrollbar(Recount_MainWindow_ScrollBarScrollBar)
|
||||
Recount_MainWindow_ScrollBarScrollBarScrollUpButton.Overlay:SetTexture(nil)
|
||||
Recount_MainWindow_ScrollBarScrollBarScrollDownButton.Overlay:SetTexture(nil)
|
||||
Recount.MainWindow.DragBottomLeft:SetNormalTexture(nil)
|
||||
Recount.MainWindow.DragBottomRight:SetNormalTexture(nil)
|
||||
|
||||
-- backdrop adjustments
|
||||
Recount.MainWindow.backdrop:SetPoint("TOPLEFT", -default_border, -5-default_border-GetPerfectPixel())
|
||||
if C.thirdparty.chatbg == "1" and C.chat.global.custombg == "1" then
|
||||
local r, g, b, a = strsplit(",", C.chat.global.background)
|
||||
Recount.MainWindow.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
|
||||
|
||||
local r, g, b, a = strsplit(",", C.chat.global.border)
|
||||
Recount.MainWindow.backdrop:SetBackdropBorderColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
HookAddonOrVariable("BCEPGP_LootFrame_Update", function()
|
||||
if C.thirdparty.bcepgp.enable == "0" then return end
|
||||
|
||||
local hook = _G.BCEPGP_LootFrame_Update
|
||||
_G.BCEPGP_LootFrame_Update = function(a,b,c,d,e,f)
|
||||
LootFrame.numLootItems = GetNumLootItems()
|
||||
hook(a,b,c,d,e,f)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Sheep Watch Continued
|
||||
-- https://www.curseforge.com/wow/addons/sheep-watch-continued/files/225593
|
||||
HookAddonOrVariable("SheepWatch", function()
|
||||
if C.thirdparty.sheepwatch.enable == "0" then return end
|
||||
|
||||
StripTextures(SheepWatch)
|
||||
|
||||
if SheepWatchFrameStatusBar then
|
||||
SheepWatchFrameStatusBar:SetStatusBarTexture(pfUI.media["img:bar"])
|
||||
SheepWatchFrameStatusBar:SetHeight(14)
|
||||
CreateBackdrop(SheepWatchFrameStatusBar)
|
||||
CreateBackdropShadow(SheepWatchFrameStatusBar)
|
||||
end
|
||||
|
||||
if SheepWatchText then
|
||||
SheepWatchText:ClearAllPoints()
|
||||
SheepWatchText:SetPoint("CENTER", 0, 4)
|
||||
end
|
||||
|
||||
if SheepWatchCounterText then
|
||||
SheepWatchCounterText:ClearAllPoints()
|
||||
SheepWatchCounterText:SetPoint("RIGHT", 0, 4)
|
||||
end
|
||||
end)
|
||||
|
||||
HookAddonOrVariable("Bag_Sort", function()
|
||||
if C.thirdparty.bag_sort.enable == "0" then return end
|
||||
|
||||
local sort = CreateFrame("Frame", nil)
|
||||
sort:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
sort:SetScript("OnEvent", function()
|
||||
this:UnregisterAllEvents()
|
||||
|
||||
pfUI.thirdparty.RegisterBagSort("Bag_Sort",
|
||||
function()
|
||||
BS_slashBagSortHandler()
|
||||
end,
|
||||
function()
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
|
||||
GameTooltip:SetText(GetAddOnMetadata("Bag_Sort","Title"))
|
||||
GameTooltip:AddLine(GetAddOnMetadata("Bag_Sort","Notes"),1,1,1)
|
||||
GameTooltip:Show()
|
||||
end,
|
||||
function()
|
||||
BS_slashBankSortHandler()
|
||||
end,
|
||||
function()
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
|
||||
GameTooltip:SetText(GetAddOnMetadata("Bag_Sort","Title"))
|
||||
GameTooltip:AddLine(GetAddOnMetadata("Bag_Sort","Notes"),1,1,1)
|
||||
GameTooltip:Show()
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
HookAddonOrVariable("AckisRecipeList", function()
|
||||
if C.thirdparty.ackis.enable == "0" then return end
|
||||
if AckisRecipeList.ShowScanButton then
|
||||
local AckisRecipeListShowScanButton = AckisRecipeList.ShowScanButton
|
||||
AckisRecipeList.ShowScanButton = function(a1,a2,a3,a4)
|
||||
-- run the original function
|
||||
AckisRecipeListShowScanButton(a1,a2,a3,a4)
|
||||
|
||||
-- apply skin and reposition the button
|
||||
SkinButton(AckisRecipeList.ScanButton)
|
||||
local a,b,c,d,e = AckisRecipeList.ScanButton:GetPoint()
|
||||
AckisRecipeList.ScanButton:SetPoint(a,b,c,d-14,e-2)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
HookAddonOrVariable("TotemTimers", function()
|
||||
if C.thirdparty.totemtimers.enable == "0" then return end
|
||||
|
||||
local function skin(button, weapon)
|
||||
if button and not button.pfskinned then
|
||||
button.pfskinned = true
|
||||
|
||||
local icon = button.icon or _G[button:GetName().."Icon"]
|
||||
icon:SetDrawLayer("BORDER")
|
||||
|
||||
SkinButton(button, nil, nil, nil, icon)
|
||||
SetAllPointsOffset(icon, button, 2)
|
||||
|
||||
if _G[button:GetName().."Flash"] then
|
||||
SetAllPointsOffset(_G[button:GetName().."Flash"], button, 3)
|
||||
_G[button:GetName().."Flash"]:SetTexCoord(.08, .92, .08, .92)
|
||||
end
|
||||
|
||||
if button.spellIcon then
|
||||
button.spellIcon:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 2)
|
||||
button.spellIcon:SetTexCoord(.08, .92, .08, .92)
|
||||
end
|
||||
|
||||
if weapon then
|
||||
-- weapon button skin workaround taken from ElvUI-TBC:
|
||||
-- https://github.com/ElvUI-TBC/ElvUI_AddOnSkins/blob/master/ElvUI_AddOnSkins/Skins/Addons/totemTimers.lua#L92-L135
|
||||
local icon2frame = _G[button:GetName().."Icon2Frame"]
|
||||
icon2frame:SetFrameStrata("MEDIUM")
|
||||
icon2frame:SetWidth(icon2frame:GetWidth() + 1)
|
||||
button.icon2 = _G[button:GetName().."Icon2"]
|
||||
SetAllPointsOffset(button.icon2, icon2frame, 2)
|
||||
|
||||
button.icon1Frame = CreateFrame("Frame", "TotemTimers_MainHandIcon1Frame", button)
|
||||
button.icon1Frame:SetWidth(16)
|
||||
button.icon1Frame:SetHeight(30)
|
||||
button.icon1Frame:SetPoint("LEFT", 0, 0)
|
||||
|
||||
button.icon1 = button.icon1Frame:CreateTexture(nil, "MEDIUM")
|
||||
SetAllPointsOffset(button.icon1, button.icon1Frame, 3)
|
||||
button.icon1:SetTexture(icon:GetTexture())
|
||||
button.icon1:SetAlpha(icon:GetAlpha())
|
||||
|
||||
_G[button:GetName().."Cooldown"]:SetFrameLevel(button.icon1Frame:GetFrameLevel() + 1)
|
||||
|
||||
icon:Hide()
|
||||
hooksecurefunc(icon, "SetTexture", function(_, texture)
|
||||
button.icon1:SetTexture(texture)
|
||||
end)
|
||||
hooksecurefunc(icon, "SetAlpha", function(_, alpha)
|
||||
button.icon1:SetAlpha(alpha)
|
||||
end)
|
||||
|
||||
if icon:GetTexCoordModifiesRect() then
|
||||
button.icon1:SetTexCoord(.08, .5, .08, .92)
|
||||
else
|
||||
button.icon1:SetTexCoord(.08, .92, .08, .92)
|
||||
end
|
||||
button.icon2:SetTexCoord(.5, .92, .08, .92)
|
||||
|
||||
hooksecurefunc(icon, "SetTexCoord", function(self, arg1, arg2)
|
||||
if arg2 == 0.5 and arg1 == 0 then
|
||||
button.icon1:SetTexCoord(.08, .5, .08, .92)
|
||||
elseif arg2 == 1 then
|
||||
button.icon1:SetTexCoord(.08, .92, .08, .92)
|
||||
end
|
||||
end)
|
||||
hooksecurefunc(button.icon2, "SetTexCoord", function(self, arg1, arg2)
|
||||
if arg2 == 1 then self:SetTexCoord(.5, .92, .08, .92) end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hooksecurefunc("TotemTimers_SetupGlobals", function()
|
||||
for i=1,4 do -- skin main buttons
|
||||
for j=1,10 do skin(_G[i.."SlaveButton"..j]) end
|
||||
skin(_G["TotemTimers"..i])
|
||||
end
|
||||
|
||||
for _, timer in pairs({ "EarthElemental", "FireElemental", "ManaTide", "ManaTrinket" }) do
|
||||
skin(_G["TotemTimers_"..timer])
|
||||
end
|
||||
|
||||
for i, tracker in pairs({ "Ankh", "Shield", "MainHand", "EarthShield" }) do
|
||||
skin(_G["TotemTimers_"..tracker], i==3)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
HookAddonOrVariable("DruidBarFrame", function()
|
||||
if C.thirdparty.druidbar.enable == "0" then return end
|
||||
local p = ManaBarColor[0]
|
||||
local pr, pg, pb = 0, 0, 0
|
||||
if p then pr, pg, pb = p.r + .5, p.g +.5, p.b +.5 end
|
||||
DruidBarKey.color = { pr, pg, pb, 1 }
|
||||
DruidBarKey.bordercolor = {1,1,1,0}
|
||||
DruidBarKey.bgcolor = {0,0,0,0}
|
||||
DruidBarKey.manatexture = pfUI.media[pfUI.uf.player.config.pbartexture]
|
||||
DruidBarKey.bordertexture = ""
|
||||
|
||||
hooksecurefunc("DruidBar_MainGraphics", function()
|
||||
local f = pfUI.uf.player
|
||||
DruidBarFrame:SetWidth((f.config.pwidth ~= "-1" and f.config.pwidth or f.config.width))
|
||||
DruidBarFrame:SetHeight(f.config.pheight)
|
||||
DruidBarMana:SetAllPoints(DruidBarFrame)
|
||||
|
||||
DruidBarText:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
|
||||
DruidBarText1:SetFont(pfUI.font_unit, C.global.font_unit_size, "OUTLINE")
|
||||
|
||||
StripTextures(DruidBarFrame)
|
||||
CreateBackdrop(DruidBarFrame)
|
||||
CreateBackdropShadow(DruidBarFrame)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
@@ -3,7 +3,7 @@
|
||||
## Author: Shagu
|
||||
## Notes: A complete user interface replacement.
|
||||
## Notes-ruRU: Полная замена пользовательского интерфейса.
|
||||
## Version: 5.5.4
|
||||
## Version: 5.5.5
|
||||
## SavedVariables: pfUI_profiles, pfUI_addon_profiles, pfUI_cache
|
||||
## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
pfUI:RegisterSkin("Arena", "tbc", function ()
|
||||
StripTextures(ArenaFrame)
|
||||
CreateBackdrop(ArenaFrame, nil, nil, .75)
|
||||
CreateBackdropShadow(ArenaFrame)
|
||||
|
||||
ArenaFrame.backdrop:SetPoint("TOPLEFT", 10, -10)
|
||||
ArenaFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 72)
|
||||
ArenaFrame:SetHitRectInsets(10,32,10,72)
|
||||
EnableMovable(ArenaFrame)
|
||||
|
||||
SkinCloseButton(ArenaFrameCloseButton, ArenaFrame.backdrop, -6, -6)
|
||||
|
||||
ArenaFrame:DisableDrawLayer("BACKGROUND")
|
||||
|
||||
ArenaFrameFrameLabel:ClearAllPoints()
|
||||
ArenaFrameFrameLabel:SetPoint("TOP", TabardFrame.backdrop, "TOP", 0, -10)
|
||||
|
||||
ArenaFrame.zones_bg = CreateFrame("Frame", "ArenaFrameZonesBackground", ArenaFrame)
|
||||
CreateBackdrop(ArenaFrame.zones_bg, nil, nil, .7)
|
||||
ArenaFrame.zones_bg:SetWidth(324)
|
||||
ArenaFrame.zones_bg:SetHeight(204)
|
||||
ArenaFrame.zones_bg:SetPoint("TOPLEFT", ArenaFrame.backdrop, "TOPLEFT", 9, -62)
|
||||
|
||||
ArenaFrame.tex1 = ArenaFrame.backdrop:CreateTexture("ArenaFrameWorldMap1", "ARTWORK")
|
||||
ArenaFrame.tex1:SetTexture("Interface\\BattlefieldFrame\\UI-Battlefield-WorldMap1")
|
||||
ArenaFrame.tex1:SetPoint("TOPLEFT", 11, -64)
|
||||
ArenaFrame.tex1:SetHeight(240)
|
||||
ArenaFrame.tex2 = ArenaFrame.backdrop:CreateTexture("ArenaFrameWorldMap2", "ARTWORK")
|
||||
ArenaFrame.tex2:SetTexture("Interface\\BattlefieldFrame\\UI-Battlefield-WorldMap2")
|
||||
ArenaFrame.tex2:SetPoint("LEFT", ArenaFrame.tex1, "RIGHT", 0, 0)
|
||||
ArenaFrame.tex2:SetHeight(240)
|
||||
|
||||
ArenaFrameNameHeader:ClearAllPoints()
|
||||
ArenaFrameNameHeader:SetPoint("BOTTOMLEFT", ArenaFrameDivider, "TOPLEFT", 14, 70)
|
||||
local shift = 28
|
||||
ArenaZone1:ClearAllPoints()
|
||||
ArenaZone1:SetPoint("TOPLEFT", ArenaFrame, "TOPLEFT", 23, -79 - shift)
|
||||
ArenaZone4:ClearAllPoints()
|
||||
ArenaZone4:SetPoint("TOPLEFT", ArenaZone3, "TOPLEFT", 0, -85 + shift)
|
||||
|
||||
ArenaFrame.textbox = CreateFrame("Frame", "ArenaFrameTextBox", ArenaFrame)
|
||||
ArenaFrame.textbox:SetWidth(324)
|
||||
ArenaFrame.textbox:SetHeight(110)
|
||||
CreateBackdrop(ArenaFrame.textbox)
|
||||
ArenaFrame.textbox:SetPoint("BOTTOM", ArenaFrame.backdrop, "BOTTOM", 0, 36)
|
||||
|
||||
ArenaFrameZoneDescription:SetFontObject(GameFontWhite)
|
||||
ArenaFrameZoneDescription:ClearAllPoints()
|
||||
ArenaFrameZoneDescription:SetPoint("TOPLEFT", ArenaFrame.textbox, "TOPLEFT", 4, -4)
|
||||
ArenaFrameZoneDescription:SetPoint("BOTTOMRIGHT", ArenaFrame.textbox, "BOTTOMRIGHT", -4, 4)
|
||||
|
||||
SkinButton(ArenaFrameCancelButton)
|
||||
SkinButton(ArenaFrameJoinButton)
|
||||
SkinButton(ArenaFrameGroupJoinButton)
|
||||
end)
|
||||
@@ -0,0 +1,119 @@
|
||||
pfUI:RegisterSkin("Arena Registrar", "tbc", function ()
|
||||
local rawborder, border = GetBorderSize()
|
||||
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
|
||||
|
||||
do -- ArenaRegistrarFrame
|
||||
StripTextures(ArenaRegistrarFrame)
|
||||
StripTextures(ArenaRegistrarGreetingFrame)
|
||||
CreateBackdrop(ArenaRegistrarFrame, nil, nil, .75)
|
||||
CreateBackdropShadow(ArenaRegistrarFrame)
|
||||
|
||||
ArenaRegistrarFrame.backdrop:SetPoint("TOPLEFT", 14, -18)
|
||||
ArenaRegistrarFrame.backdrop:SetPoint("BOTTOMRIGHT", -28, 66)
|
||||
ArenaRegistrarFrame:SetHitRectInsets(14,28,18,66)
|
||||
EnableMovable(ArenaRegistrarFrame)
|
||||
|
||||
SkinCloseButton(ArenaRegistrarFrameCloseButton, ArenaRegistrarFrame.backdrop, -6, -6)
|
||||
|
||||
ArenaRegistrarFrame:DisableDrawLayer("BACKGROUND")
|
||||
|
||||
ArenaRegistrarFrameNpcNameText:ClearAllPoints()
|
||||
ArenaRegistrarFrameNpcNameText:SetPoint("TOP", ArenaRegistrarFrame.backdrop, "TOP", 0, -10)
|
||||
|
||||
SkinButton(ArenaRegistrarFrameGoodbyeButton)
|
||||
SkinButton(ArenaRegistrarFrameCancelButton)
|
||||
SkinButton(ArenaRegistrarFramePurchaseButton)
|
||||
|
||||
ArenaRegistrarCostLabel:SetFontObject("GameFontWhite")
|
||||
ArenaRegistrarFrameEditBox:DisableDrawLayer("BACKGROUND")
|
||||
CreateBackdrop(ArenaRegistrarFrameEditBox, nil, nil, 1)
|
||||
ArenaRegistrarFrameEditBox:SetHeight(16)
|
||||
|
||||
local bg = ArenaRegistrarFrame:CreateTexture(nil, "LOW")
|
||||
bg:SetTexCoord(.1,1,0,1)
|
||||
bg:SetTexture("Interface\\Stationery\\StationeryTest1")
|
||||
bg:SetPoint("TOPLEFT", 23, -81)
|
||||
bg:SetPoint("BOTTOMRIGHT", -40, 100)
|
||||
end
|
||||
|
||||
do -- PVPBannerFrame
|
||||
StripTextures(PVPBannerFrame)
|
||||
CreateBackdrop(PVPBannerFrame, nil, nil, .75)
|
||||
CreateBackdropShadow(PVPBannerFrame)
|
||||
|
||||
PVPBannerFrame.backdrop:SetPoint("TOPLEFT", 10, -12)
|
||||
PVPBannerFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 72)
|
||||
PVPBannerFrame:SetHitRectInsets(10,32,12,72)
|
||||
EnableMovable(PVPBannerFrame)
|
||||
|
||||
SkinCloseButton(PVPBannerFrameCloseButton, PVPBannerFrame.backdrop, -6, -6)
|
||||
|
||||
PVPBannerFrame:DisableDrawLayer("BACKGROUND")
|
||||
|
||||
PVPBannerFrameNameText:ClearAllPoints()
|
||||
PVPBannerFrameNameText:SetPoint("TOP", ArenaRegistrarFrame.backdrop, "TOP", 0, -10)
|
||||
PVPBannerFrameGreetingText:ClearAllPoints()
|
||||
PVPBannerFrameGreetingText:SetPoint("TOP", PVPBannerFrameNameText, "TOP", 0, -10)
|
||||
|
||||
PVPBannerFrameCustomizationBorder:Hide()
|
||||
PVPBannerFrameCustomization1:ClearAllPoints()
|
||||
PVPBannerFrameCustomization1:SetPoint("TOPLEFT", PVPBannerFrameCustomizationBorder, "TOPLEFT", 48, -45)
|
||||
for i = 1, 2 do
|
||||
local frame = _G["PVPBannerFrameCustomization"..i]
|
||||
StripTextures(frame)
|
||||
CreateBackdrop(frame, nil, true)
|
||||
frame:SetHeight(25)
|
||||
|
||||
local left = _G["PVPBannerFrameCustomization"..i.."LeftButton"]
|
||||
StripTextures(left)
|
||||
SkinArrowButton(left, "left", 25)
|
||||
left:ClearAllPoints()
|
||||
left:SetPoint("LEFT", 0, 0)
|
||||
|
||||
local right = _G["PVPBannerFrameCustomization"..i.."RightButton"]
|
||||
StripTextures(right)
|
||||
SkinArrowButton(right, "right", 25)
|
||||
right:ClearAllPoints()
|
||||
right:SetPoint("RIGHT", 0, 0)
|
||||
|
||||
local text = _G["PVPBannerFrameCustomization"..i.."Text"]
|
||||
text:ClearAllPoints()
|
||||
text:SetPoint("CENTER", 0, 0)
|
||||
end
|
||||
|
||||
local width = PVPBannerFrameCustomization2:GetWidth()
|
||||
for i = 1, 3 do
|
||||
local btn = _G["PVPColorPickerButton"..i]
|
||||
local prev = _G["PVPColorPickerButton"..(i-1)]
|
||||
|
||||
SkinButton(btn)
|
||||
btn:SetWidth(width)
|
||||
btn:ClearAllPoints()
|
||||
if prev then
|
||||
btn:SetPoint("TOPLEFT", prev, "BOTTOMLEFT", 0, -5)
|
||||
else
|
||||
btn:SetPoint("TOPLEFT", PVPBannerFrameCustomization2, "BOTTOMLEFT", 0, -5)
|
||||
end
|
||||
end
|
||||
|
||||
local PVPBannerFrameCancelButton
|
||||
do -- fix Blizzard bug. A button with the same name is created twice.
|
||||
for k,v in ipairs({PVPBannerFrameCustomizationFrame:GetChildren()}) do
|
||||
if v:GetName() == "PVPBannerFrameCancelButton" then v:Hide() end -- This is the wrong and broken button.
|
||||
end
|
||||
|
||||
for k,v in ipairs({PVPBannerFrame:GetChildren()}) do
|
||||
if v:GetName() == "PVPBannerFrameCancelButton" then PVPBannerFrameCancelButton = v end
|
||||
end
|
||||
end
|
||||
|
||||
SkinButton(PVPBannerFrameSaveButton)
|
||||
|
||||
SkinButton(PVPBannerFrameCancelButton)
|
||||
PVPBannerFrameCancelButton:ClearAllPoints()
|
||||
PVPBannerFrameCancelButton:SetPoint("TOPRIGHT", PVPColorPickerButton3, "BOTTOMRIGHT", 0, -10)
|
||||
SkinButton(PVPBannerFrameAcceptButton)
|
||||
PVPBannerFrameAcceptButton:ClearAllPoints()
|
||||
PVPBannerFrameAcceptButton:SetPoint("RIGHT", PVPBannerFrameCancelButton, "LEFT", -2*bpad, 0)
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,131 @@
|
||||
pfUI:RegisterSkin("Guild Bank", "tbc", function ()
|
||||
local rawborder, border = GetBorderSize()
|
||||
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
|
||||
|
||||
HookAddonOrVariable("Blizzard_GuildBankUI", function()
|
||||
do -- GuildBankFrame
|
||||
StripTextures(GuildBankFrame)
|
||||
CreateBackdrop(GuildBankFrame, nil, nil, .75)
|
||||
CreateBackdropShadow(GuildBankFrame)
|
||||
GuildBankFrame.backdrop:SetPoint("TOPLEFT", 10, -30)
|
||||
GuildBankFrame.backdrop:SetPoint("BOTTOMRIGHT", 0, 4)
|
||||
GuildBankFrame:SetHitRectInsets(10,0,30,4)
|
||||
EnableMovable(GuildBankFrame)
|
||||
|
||||
SkinCloseButton(GetNoNameObject(GuildBankFrame, "Button", nil, "UI-Panel-MinimizeButton-Up"), GuildBankFrame.backdrop, -6, -6)
|
||||
|
||||
GuildBankEmblemFrame:ClearAllPoints()
|
||||
GuildBankEmblemFrame:SetPoint("BOTTOM", GuildBankFrame.backdrop, "TOP", -70, 0)
|
||||
|
||||
for i = 1, 4 do
|
||||
local tab = _G["GuildBankFrameTab"..i]
|
||||
local lastTab = _G["GuildBankFrameTab"..(i-1)]
|
||||
tab:ClearAllPoints()
|
||||
if lastTab then
|
||||
tab:SetPoint("LEFT", lastTab, "RIGHT", border*2 + 1, 0)
|
||||
else
|
||||
tab:SetPoint("TOPLEFT", GuildBankFrame.backdrop, "BOTTOMLEFT", bpad, -(border + (border == 1 and 1 or 2)))
|
||||
end
|
||||
SkinTab(tab)
|
||||
end
|
||||
for i = 1, 6 do
|
||||
local frame = _G["GuildBankTab"..i]
|
||||
local button = _G["GuildBankTab"..i.."Button"]
|
||||
local lastbutton = _G["GuildBankTab"..(i-1).."Button"]
|
||||
local texture = _G["GuildBankTab"..i.."ButtonIconTexture"]
|
||||
|
||||
StripTextures(frame)
|
||||
SkinButton(button, nil, nil, nil, texture)
|
||||
|
||||
button:ClearAllPoints()
|
||||
if lastbutton then
|
||||
button:SetPoint("TOP", lastbutton, "BOTTOM", 0, - (border + (border == 1 and 1 or 2) + bpad))
|
||||
else
|
||||
button:SetPoint("TOPLEFT", 6, -60)
|
||||
end
|
||||
|
||||
function button.SetChecked(self, checked)
|
||||
if checked then
|
||||
self.locked = true
|
||||
self:SetBackdropBorderColor(1,1,1)
|
||||
else
|
||||
self.locked = false
|
||||
self:SetBackdropBorderColor(GetStringColor(pfUI_config.appearance.border.color))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, NUM_GUILDBANK_COLUMNS do
|
||||
local column = _G["GuildBankColumn"..i]
|
||||
StripTextures(column)
|
||||
for j = 1, NUM_SLOTS_PER_GUILDBANK_GROUP do
|
||||
local slot = _G["GuildBankColumn"..i.."Button"..j]
|
||||
SkinButton(slot, nil, nil, nil, _G[slot:GetName().."IconTexture"], true)
|
||||
end
|
||||
end
|
||||
|
||||
hooksecurefunc("GuildBankFrame_Update", function()
|
||||
if GuildBankFrame.mode ~= "bank" then return end
|
||||
|
||||
for i = 1, MAX_GUILDBANK_SLOTS_PER_TAB do
|
||||
local index = math.fmod(i, NUM_SLOTS_PER_GUILDBANK_GROUP)
|
||||
if index == 0 then index = NUM_SLOTS_PER_GUILDBANK_GROUP end
|
||||
local column = ceil((i-.5)/NUM_SLOTS_PER_GUILDBANK_GROUP)
|
||||
local slot = _G["GuildBankColumn"..column.."Button"..index]
|
||||
local tab = GetCurrentGuildBankTab()
|
||||
local link = GetGuildBankItemLink(tab, i)
|
||||
if link then
|
||||
local r,g,b = GetItemQualityColor(select(3, GetItemInfo(link)))
|
||||
slot:SetBackdropBorderColor(r,g,b,1)
|
||||
else
|
||||
slot:SetBackdropBorderColor(GetStringColor(pfUI_config.appearance.border.color))
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
SkinButton(GuildBankFrameDepositButton)
|
||||
SkinButton(GuildBankFrameWithdrawButton)
|
||||
GuildBankFrameWithdrawButton:ClearAllPoints()
|
||||
GuildBankFrameWithdrawButton:SetPoint("RIGHT", GuildBankFrameDepositButton, "LEFT", -2*bpad, 0)
|
||||
|
||||
SkinButton(GuildBankInfoSaveButton)
|
||||
GuildBankInfoScrollFrameScrollBar:Hide()
|
||||
end
|
||||
|
||||
do -- GuildBankPopupFrame
|
||||
StripTextures(GuildBankPopupFrame)
|
||||
CreateBackdrop(GuildBankPopupFrame, nil, nil, .75)
|
||||
CreateBackdropShadow(GuildBankPopupFrame)
|
||||
GuildBankPopupFrame.backdrop:SetPoint("TOPLEFT", 0, -6)
|
||||
GuildBankPopupFrame.backdrop:SetPoint("BOTTOMRIGHT", -26, 26)
|
||||
GuildBankPopupFrame:SetHitRectInsets(0,26,6,26)
|
||||
|
||||
GuildBankPopupFrame.backdrop:SetPoint("TOPLEFT", GuildBankFrame.backdrop, "TOPRIGHT", 2*border, 0)
|
||||
|
||||
GuildBankPopupEditBox:DisableDrawLayer("BACKGROUND")
|
||||
CreateBackdrop(GuildBankPopupEditBox)
|
||||
|
||||
StripTextures(GuildBankPopupScrollFrame)
|
||||
CreateBackdrop(GuildBankPopupScrollFrame)
|
||||
SkinScrollbar(GuildBankPopupScrollFrameScrollBar)
|
||||
GuildBankPopupScrollFrame:ClearAllPoints()
|
||||
GuildBankPopupScrollFrame:SetPoint("TOPLEFT", GuildBankPopupEditBox, "BOTTOMLEFT", -11, -14)
|
||||
GuildBankPopupScrollFrame:SetWidth(182)
|
||||
GuildBankPopupScrollFrame:SetHeight(178)
|
||||
|
||||
for i = 1, 16 do
|
||||
local slot = _G["GuildBankPopupButton"..i]
|
||||
StripTextures(slot)
|
||||
SkinButton(slot, nil, nil, nil, _G["GuildBankPopupButton"..i.."Icon"], true)
|
||||
end
|
||||
|
||||
GuildBankPopupButton1:ClearAllPoints()
|
||||
GuildBankPopupButton1:SetPoint("TOPLEFT", GuildBankPopupScrollFrame, "TOPLEFT", 4, -4)
|
||||
|
||||
SkinButton(GuildBankPopupCancelButton)
|
||||
SkinButton(GuildBankPopupOkayButton)
|
||||
GuildBankPopupOkayButton:ClearAllPoints()
|
||||
GuildBankPopupOkayButton:SetPoint("RIGHT", GuildBankPopupCancelButton, "LEFT", -2*bpad, 0)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -0,0 +1,75 @@
|
||||
pfUI:RegisterSkin("Looking for group", "tbc", function ()
|
||||
local rawborder, border = GetBorderSize()
|
||||
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
|
||||
|
||||
StripTextures(LFGParentFrame)
|
||||
CreateBackdrop(LFGParentFrame, nil, nil, .75)
|
||||
CreateBackdropShadow(LFGParentFrame)
|
||||
|
||||
LFGParentFrame.backdrop:SetPoint("TOPLEFT", 14, -10)
|
||||
LFGParentFrame.backdrop:SetPoint("BOTTOMRIGHT", -26, 72)
|
||||
LFGParentFrame:SetHitRectInsets(14,26,10,72)
|
||||
EnableMovable(LFGParentFrame)
|
||||
|
||||
SkinCloseButton(GetNoNameObject(LFGParentFrame, 'Button', nil, "UI-Panel-MinimizeButton-Up"), LFGParentFrame.backdrop, -6, -6)
|
||||
|
||||
LFGParentFrame:DisableDrawLayer("BACKGROUND")
|
||||
|
||||
LFGParentFrameTitle:ClearAllPoints()
|
||||
LFGParentFrameTitle:SetPoint("TOP", LFGParentFrame.backdrop, "TOP", 0, -10)
|
||||
|
||||
SkinTab(LFGParentFrameTab1)
|
||||
LFGParentFrameTab1:ClearAllPoints()
|
||||
LFGParentFrameTab1:SetPoint("TOPLEFT", LFGParentFrame.backdrop, "BOTTOMLEFT", bpad, -(border + (border == 1 and 1 or 2)))
|
||||
SkinTab(LFGParentFrameTab2)
|
||||
LFGParentFrameTab2:ClearAllPoints()
|
||||
LFGParentFrameTab2:SetPoint("LEFT", LFGParentFrameTab1, "RIGHT", border*2 + 1, 0)
|
||||
LFGParentFrameBackground:Hide()
|
||||
|
||||
LFGFrameClearAllButton:ClearAllPoints()
|
||||
LFGFrameClearAllButton:SetPoint("RIGHT", LFGFrameDoneButton, "LEFT", -2*bpad, 0)
|
||||
|
||||
StripTextures(AutoJoinBackground)
|
||||
SkinCheckbox(AutoJoinCheckButton)
|
||||
|
||||
StripTextures(AddMemberBackground)
|
||||
SkinCheckbox(AutoAddMembersCheckButton)
|
||||
|
||||
CreateBackdrop(LFGComment)
|
||||
|
||||
-- skin buttons
|
||||
local buttons = {
|
||||
"LFGWizardFrameLFGButton",
|
||||
"LFGWizardFrameLFMButton",
|
||||
"LFGFrameDoneButton",
|
||||
"LFGFrameClearAllButton",
|
||||
"LFMFrameGroupInviteButton",
|
||||
"LFMFrameSendMessageButton",
|
||||
"LFMFrameSearchButton",
|
||||
"LFMFrameColumnHeader1",
|
||||
"LFMFrameColumnHeader2",
|
||||
"LFMFrameColumnHeader3",
|
||||
"LFMFrameColumnHeader4",
|
||||
}
|
||||
|
||||
for _, name in pairs(buttons) do
|
||||
SkinButton(_G[name])
|
||||
end
|
||||
|
||||
-- skin dropdowns
|
||||
local dropdowns = {
|
||||
"LFGFrameTypeDropDown1",
|
||||
"LFGFrameNameDropDown1",
|
||||
"LFGFrameTypeDropDown2",
|
||||
"LFGFrameNameDropDown2",
|
||||
"LFGFrameTypeDropDown3",
|
||||
"LFGFrameNameDropDown3",
|
||||
}
|
||||
|
||||
for _, name in pairs(dropdowns) do
|
||||
SkinDropDown(_G[name])
|
||||
end
|
||||
|
||||
SkinDropDown(LFMFrameTypeDropDown, nil, nil, nil, true)
|
||||
SkinDropDown(LFMFrameNameDropDown, nil, nil, nil, true)
|
||||
end)
|
||||
@@ -0,0 +1,175 @@
|
||||
pfUI:RegisterSkin("Options - Interface", "tbc", function ()
|
||||
local rawborder, border = GetBorderSize()
|
||||
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
|
||||
|
||||
StripTextures(InterfaceOptionsFrame)
|
||||
CreateBackdrop(InterfaceOptionsFrame, nil, nil, .75)
|
||||
CreateBackdropShadow(InterfaceOptionsFrame)
|
||||
|
||||
EnableMovable(InterfaceOptionsFrame)
|
||||
|
||||
InterfaceOptionsFrameHeaderText:ClearAllPoints()
|
||||
InterfaceOptionsFrameHeaderText:SetPoint("TOP", InterfaceOptionsFrame.backdrop, "TOP", 0, -10)
|
||||
|
||||
StripTextures(InterfaceOptionsFrameCategories)
|
||||
CreateBackdrop(InterfaceOptionsFrameCategories, nil, true, .75)
|
||||
StripTextures(InterfaceOptionsFrameAddOns)
|
||||
CreateBackdrop(InterfaceOptionsFrameAddOns, nil, true, .75)
|
||||
CreateBackdrop(InterfaceOptionsFramePanelContainer, nil, true, .75)
|
||||
|
||||
SkinTab(InterfaceOptionsFrameTab1)
|
||||
InterfaceOptionsFrameTab1:ClearAllPoints()
|
||||
InterfaceOptionsFrameTab1:SetPoint("BOTTOMLEFT", InterfaceOptionsFrameCategories, "TOPLEFT", bpad, border + (border == 1 and 1 or 2))
|
||||
SkinTab(InterfaceOptionsFrameTab2)
|
||||
InterfaceOptionsFrameTab2:ClearAllPoints()
|
||||
InterfaceOptionsFrameTab2:SetPoint("LEFT", InterfaceOptionsFrameTab1, "RIGHT", border*2 + 1, 0)
|
||||
|
||||
SkinButton(InterfaceOptionsFrameDefaults)
|
||||
InterfaceOptionsFrameDefaults:ClearAllPoints()
|
||||
InterfaceOptionsFrameDefaults:SetPoint("TOPLEFT", InterfaceOptionsFrameCategories, "BOTTOMLEFT", 0, -10)
|
||||
SkinButton(InterfaceOptionsFrameCancel)
|
||||
InterfaceOptionsFrameCancel:ClearAllPoints()
|
||||
InterfaceOptionsFrameCancel:SetPoint("TOPRIGHT", InterfaceOptionsFramePanelContainer, "BOTTOMRIGHT", 0, -10)
|
||||
SkinButton(InterfaceOptionsFrameOkay)
|
||||
InterfaceOptionsFrameOkay:ClearAllPoints()
|
||||
InterfaceOptionsFrameOkay:SetPoint("RIGHT", InterfaceOptionsFrameCancel, "LEFT", -2*bpad, 0)
|
||||
|
||||
-- universal code for handling any frames!
|
||||
local function SkinAllObjects(frame)
|
||||
for _,obj in ipairs({frame:GetChildren()}) do
|
||||
local obj_type = obj:GetObjectType()
|
||||
if obj_type == "CheckButton" then
|
||||
local size = obj:GetHeight()
|
||||
if size > 26 then size = 26 end
|
||||
SkinCheckbox(obj, size)
|
||||
elseif obj_type == "Button" then
|
||||
SkinButton(obj)
|
||||
elseif obj_type == "Slider" then
|
||||
SkinSlider(obj)
|
||||
elseif obj_type == "Frame" then
|
||||
local name = obj.GetName and obj:GetName()
|
||||
if name and _G[name.."Button"] then
|
||||
SkinDropDown(obj)
|
||||
else
|
||||
SkinAllObjects(obj)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local blizzardCategories = {
|
||||
InterfaceOptionsControlsPanel, InterfaceOptionsCombatPanel, InterfaceOptionsDisplayPanel,
|
||||
InterfaceOptionsQuestsPanel, InterfaceOptionsSocialPanel, InterfaceOptionsActionBarsPanel,
|
||||
InterfaceOptionsNamesPanel, InterfaceOptionsCombatTextPanel, InterfaceOptionsStatusTextPanel,
|
||||
InterfaceOptionsPartyRaidPanel, InterfaceOptionsCameraPanel, InterfaceOptionsMousePanel,
|
||||
InterfaceOptionsHelpPanel, InterfaceOptionsLanguagesPanel
|
||||
}
|
||||
for _,frame in ipairs(blizzardCategories) do
|
||||
SkinAllObjects(frame)
|
||||
end
|
||||
|
||||
-- skin the option panel of any addon
|
||||
for _,frame in pairs(INTERFACEOPTIONS_ADDONCATEGORIES) do
|
||||
SkinAllObjects(frame)
|
||||
end
|
||||
end)
|
||||
|
||||
pfUI:RegisterSkin("Options - Interface", "vanilla", function ()
|
||||
local rawborder, border = GetBorderSize()
|
||||
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
|
||||
|
||||
UIOptionsFrame:SetParent(UIParent)
|
||||
UIOptionsFrame:SetWidth(1024)
|
||||
UIOptionsFrame:SetHeight(700)
|
||||
|
||||
StripTextures(UIOptionsFrame)
|
||||
CreateBackdrop(UIOptionsFrame, nil, nil, .75)
|
||||
CreateBackdropShadow(UIOptionsFrame)
|
||||
|
||||
EnableMovable(UIOptionsFrame)
|
||||
|
||||
HookScript(UIOptionsFrame, "OnShow", function()
|
||||
this:ClearAllPoints()
|
||||
this:SetPoint("CENTER", 0, 0)
|
||||
end)
|
||||
|
||||
UIOptionsFrame.backdrop:SetPoint("BOTTOMRIGHT", 0, 50)
|
||||
UIOptionsFrame:SetHitRectInsets(0,0,0,50)
|
||||
|
||||
|
||||
-- increase button layer
|
||||
UIOptionsFrameTab1:SetFrameLevel(8)
|
||||
UIOptionsFrameTab2:SetFrameLevel(8)
|
||||
UIOptionsFrameDefaults:SetFrameLevel(8)
|
||||
UIOptionsFrameCancel:SetFrameLevel(8)
|
||||
UIOptionsFrameOkay:SetFrameLevel(8)
|
||||
|
||||
local close = GetNoNameObject(UIOptionsFrame, "Button", nil, "UI-Panel-MinimizeButton-Up")
|
||||
if close then
|
||||
close:SetFrameLevel(8)
|
||||
SkinCloseButton(close, UIOptionsFrame.backdrop, -6, -6)
|
||||
end
|
||||
|
||||
if UIOptionsFrameTitle then
|
||||
UIOptionsFrameTitle:ClearAllPoints()
|
||||
UIOptionsFrameTitle:SetPoint("TOP", UIOptionsFrame.backdrop, "TOP", 0, -10)
|
||||
end
|
||||
|
||||
SkinTab(UIOptionsFrameTab1)
|
||||
UIOptionsFrameTab1:ClearAllPoints()
|
||||
UIOptionsFrameTab1:SetPoint("TOPLEFT", UIOptionsFrame.backdrop, "TOPLEFT", 20, -20)
|
||||
UIOptionsFrameTab1:SetScript("OnClick", function()
|
||||
PanelTemplates_Tab_OnClick(UIOptionsFrame)
|
||||
BasicOptions:Show()
|
||||
AdvancedOptions:Hide()
|
||||
PlaySound("igCharacterInfoTab")
|
||||
end)
|
||||
SkinTab(UIOptionsFrameTab2)
|
||||
UIOptionsFrameTab2:ClearAllPoints()
|
||||
UIOptionsFrameTab2:SetPoint("LEFT", UIOptionsFrameTab1, "RIGHT", border*2 + 1, 0)
|
||||
UIOptionsFrameTab2:SetScript("OnClick", function()
|
||||
PanelTemplates_Tab_OnClick(UIOptionsFrame)
|
||||
BasicOptions:Hide()
|
||||
AdvancedOptions:Show()
|
||||
PlaySound("igCharacterInfoTab")
|
||||
end)
|
||||
|
||||
UIOptionsFrameCheckButton1:ClearAllPoints() -- Invert Mouse button
|
||||
UIOptionsFrameCheckButton1:SetPoint("TOPLEFT", UIOptionsFrameSlider1, "TOPRIGHT", 38, 14)
|
||||
|
||||
for i=1, 69 do
|
||||
local buton = _G["UIOptionsFrameCheckButton"..i]
|
||||
if buton then
|
||||
SkinCheckbox(buton)
|
||||
end
|
||||
end
|
||||
|
||||
for i=1, 4 do
|
||||
SkinSlider(_G["UIOptionsFrameSlider"..i])
|
||||
end
|
||||
|
||||
CreateBackdrop(BasicOptionsGeneral, nil, true, .75)
|
||||
CreateBackdrop(BasicOptionsDisplay, nil, true, .75)
|
||||
CreateBackdrop(BasicOptionsCamera, nil, true, .75)
|
||||
CreateBackdrop(BasicOptionsHelp, nil, true, .75)
|
||||
CreateBackdrop(AdvancedOptionsActionBars, nil, true, .75)
|
||||
CreateBackdrop(AdvancedOptionsChat, nil, true, .75)
|
||||
CreateBackdrop(AdvancedOptionsRaid, nil, true, .75)
|
||||
CreateBackdrop(AdvancedOptionsCombatText, nil, true, .75)
|
||||
|
||||
SkinDropDown(UIOptionsFrameClickCameraDropDown)
|
||||
SkinDropDown(UIOptionsFrameCameraDropDown)
|
||||
SkinDropDown(UIOptionsFrameTargetofTargetDropDown)
|
||||
SkinDropDown(UIOptionsFrameCombatTextDropDown)
|
||||
|
||||
SkinButton(UIOptionsFrameResetTutorials)
|
||||
SkinButton(UIOptionsFrameDefaults)
|
||||
UIOptionsFrameDefaults:ClearAllPoints()
|
||||
UIOptionsFrameDefaults:SetPoint("BOTTOMLEFT", UIOptionsFrame.backdrop, "BOTTOMLEFT", 14, 14)
|
||||
SkinButton(UIOptionsFrameCancel)
|
||||
UIOptionsFrameCancel:ClearAllPoints()
|
||||
UIOptionsFrameCancel:SetPoint("BOTTOMRIGHT", UIOptionsFrame.backdrop, "BOTTOMRIGHT", -14, 14)
|
||||
SkinButton(UIOptionsFrameOkay)
|
||||
UIOptionsFrameOkay:ClearAllPoints()
|
||||
UIOptionsFrameOkay:SetPoint("RIGHT", UIOptionsFrameCancel, "LEFT", -2*bpad, 0)
|
||||
end)
|
||||
@@ -0,0 +1,39 @@
|
||||
pfUI:RegisterSkin("Item Socketing", "tbc", function ()
|
||||
local rawborder, border = GetBorderSize()
|
||||
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
|
||||
|
||||
HookAddonOrVariable("Blizzard_ItemSocketingUI", function()
|
||||
StripTextures(ItemSocketingFrame)
|
||||
CreateBackdrop(ItemSocketingFrame, nil, nil, .75)
|
||||
CreateBackdropShadow(ItemSocketingFrame)
|
||||
ItemSocketingFrame.backdrop:SetPoint("TOPLEFT", 8, -14)
|
||||
ItemSocketingFrame.backdrop:SetPoint("BOTTOMRIGHT", -4, 28)
|
||||
ItemSocketingFrame:SetHitRectInsets(8,4,14,28)
|
||||
EnableMovable(ItemSocketingFrame)
|
||||
|
||||
SkinCloseButton(ItemSocketingCloseButton, ItemSocketingFrame.backdrop, -6, -6)
|
||||
|
||||
ItemSocketingFrame:DisableDrawLayer("BACKGROUND")
|
||||
|
||||
StripTextures(ItemSocketingScrollFrame)
|
||||
CreateBackdrop(ItemSocketingScrollFrame)
|
||||
ItemSocketingScrollFrame:ClearAllPoints()
|
||||
ItemSocketingScrollFrame:SetPoint("TOPLEFT", 32, -70)
|
||||
ItemSocketingScrollFrame.backdrop:SetPoint("TOPLEFT", 0, 10)
|
||||
ItemSocketingScrollFrame.backdrop:SetPoint("BOTTOMRIGHT", 0, -10)
|
||||
SkinScrollbar(ItemSocketingScrollFrameScrollBar)
|
||||
ItemSocketingScrollFrameScrollBar:ClearAllPoints()
|
||||
ItemSocketingScrollFrameScrollBar:SetPoint("TOPLEFT", ItemSocketingScrollFrame.backdrop, "TOPRIGHT", 6, -16)
|
||||
ItemSocketingScrollFrameScrollBar:SetPoint("BOTTOMLEFT", ItemSocketingScrollFrame.backdrop, "BOTTOMRIGHT", 6, 16)
|
||||
SkinButton(ItemSocketingSocketButton)
|
||||
for i = 1, MAX_NUM_SOCKETS do
|
||||
local btn = _G["ItemSocketingSocket"..i]
|
||||
StripTextures(btn)
|
||||
SkinButton(btn, nil, nil, nil, _G["ItemSocketingSocket"..i.."IconTexture"], true)
|
||||
end
|
||||
local orig = ItemSocketingSocket1.SetPoint
|
||||
ItemSocketingSocket1.SetPoint = function(self,a,b,c,x,y)
|
||||
orig(self,a,b,c,x-10,y+15)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -0,0 +1,122 @@
|
||||
pfUI:RegisterSkin("Time Manager", "tbc", function ()
|
||||
local rawborder, border = GetBorderSize()
|
||||
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
|
||||
|
||||
HookAddonOrVariable("Blizzard_TimeManager", function()
|
||||
do -- TimeManagerFrame
|
||||
StripTextures(TimeManagerFrame)
|
||||
CreateBackdrop(TimeManagerFrame, nil, nil, .75)
|
||||
CreateBackdropShadow(TimeManagerFrame)
|
||||
TimeManagerClockButton:Hide()
|
||||
TimeManagerClockButton.Show = function() return end
|
||||
|
||||
TimeManagerFrame.backdrop:SetPoint("TOPLEFT", 10, -10)
|
||||
TimeManagerFrame.backdrop:SetPoint("BOTTOMRIGHT", -48, 1)
|
||||
TimeManagerFrame:SetHitRectInsets(10,48,10,1)
|
||||
EnableMovable(TimeManagerFrame)
|
||||
|
||||
SkinCloseButton(TimeManagerCloseButton, TimeManagerFrame.backdrop, -6, -6)
|
||||
|
||||
local header = GetNoNameObject(TimeManagerFrame, 'FontString', 'BORDER', TIMEMANAGER_TITLE)
|
||||
header:ClearAllPoints()
|
||||
header:SetPoint("TOP", TimeManagerFrame.backdrop, "TOP", 0, -10)
|
||||
|
||||
TimeManagerFrameTicker:ClearAllPoints()
|
||||
TimeManagerFrameTicker:SetPoint("TOPLEFT", TimeManagerFrame.backdrop, "TOPLEFT", 30, -37)
|
||||
|
||||
StripTextures(TimeManagerStopwatchFrame)
|
||||
local texture = TimeManagerStopwatchCheck:GetNormalTexture():GetTexture()
|
||||
SkinButton(TimeManagerStopwatchCheck)
|
||||
TimeManagerStopwatchCheck:SetNormalTexture(texture)
|
||||
HandleIcon(TimeManagerStopwatchCheck, TimeManagerStopwatchCheck:GetNormalTexture())
|
||||
|
||||
local frames = {
|
||||
[TimeManagerAlarmHourDropDown] = '0',
|
||||
[TimeManagerAlarmMinuteDropDown] = '1',
|
||||
[TimeManagerAlarmAMPMDropDown] = '-4'
|
||||
}
|
||||
for frame,Xoffset in pairs(frames) do
|
||||
SkinDropDown(frame, nil, nil, nil, true)
|
||||
local text = _G[frame:GetName().."Text"]
|
||||
local left = _G[frame:GetName().."Left"]
|
||||
text:ClearAllPoints()
|
||||
text:SetPoint("LEFT", left, "LEFT", Xoffset, 1)
|
||||
end
|
||||
TimeManagerAlarmHourDropDown:ClearAllPoints()
|
||||
TimeManagerAlarmHourDropDown:SetPoint("TOPLEFT", TimeManagerAlarmTimeLabel, "BOTTOMLEFT", -4, -4)
|
||||
|
||||
TimeManagerAlarmMessageFrame:ClearAllPoints()
|
||||
TimeManagerAlarmMessageFrame:SetPoint("TOPLEFT", TimeManagerAlarmTimeFrame, "BOTTOMLEFT", 0, 0)
|
||||
|
||||
TimeManagerAlarmMessageEditBox:DisableDrawLayer("BACKGROUND")
|
||||
CreateBackdrop(TimeManagerAlarmMessageEditBox)
|
||||
TimeManagerAlarmMessageEditBox:ClearAllPoints()
|
||||
TimeManagerAlarmMessageEditBox:SetWidth(142)
|
||||
TimeManagerAlarmMessageEditBox:SetPoint("TOPLEFT", TimeManagerAlarmMessageLabel, "BOTTOMLEFT", 13, -5)
|
||||
|
||||
SkinButton(TimeManagerAlarmEnabledButton)
|
||||
TimeManagerAlarmEnabledButton.SetNormalTexture = function() end
|
||||
TimeManagerAlarmEnabledButton.SetPushedTexture = function() end
|
||||
hooksecurefunc("TimeManagerAlarmEnabledButton_Update", function()
|
||||
if TimeManagerAlarmEnabledButton:GetText() == TIMEMANAGER_ALARM_ENABLED then
|
||||
TimeManagerAlarmEnabledButton:LockHighlight()
|
||||
else
|
||||
TimeManagerAlarmEnabledButton:UnlockHighlight()
|
||||
end
|
||||
end)
|
||||
TimeManagerAlarmEnabledButton:ClearAllPoints()
|
||||
TimeManagerAlarmEnabledButton:SetWidth(146)
|
||||
TimeManagerAlarmEnabledButton:SetPoint("TOP", TimeManagerAlarmMessageEditBox, "BOTTOM", 0, -8)
|
||||
|
||||
|
||||
SkinCheckbox(TimeManagerMilitaryTimeCheck)
|
||||
SkinCheckbox(TimeManagerLocalTimeCheck)
|
||||
end
|
||||
|
||||
do -- StopwatchFrame
|
||||
StripTextures(StopwatchFrame)
|
||||
|
||||
StripTextures(StopwatchTabFrame)
|
||||
CreateBackdrop(StopwatchTabFrame, nil, true)
|
||||
StopwatchTabFrame:SetWidth(122)
|
||||
StopwatchTabFrame:SetHeight(18)
|
||||
StopwatchTitle:ClearAllPoints()
|
||||
StopwatchTitle:SetPoint("CENTER", 0, 0)
|
||||
SkinCloseButton(StopwatchCloseButton, StopwatchTabFrame, 0, 0)
|
||||
|
||||
local orig = StopwatchResetButton.SetNormalTexture
|
||||
StopwatchResetButton.SetNormalTexture = function(self, tex)
|
||||
orig(self, tex)
|
||||
local texture = self:GetNormalTexture()
|
||||
texture:SetDesaturated(1)
|
||||
texture:SetTexCoord(.25, .75, .28, .78)
|
||||
end
|
||||
SkinButton(StopwatchResetButton, nil, nil, nil, StopwatchResetButton:GetNormalTexture())
|
||||
StopwatchResetButton:SetNormalTexture("Interface\\TimeManager\\ResetButton") -- initiate update texture
|
||||
StopwatchResetButton:ClearAllPoints()
|
||||
StopwatchResetButton:SetWidth(20)
|
||||
StopwatchResetButton:SetHeight(20)
|
||||
StopwatchResetButton:SetPoint("TOPRIGHT", StopwatchTabFrame, "BOTTOMRIGHT", 0, -2*border + 1)
|
||||
|
||||
local orig = StopwatchPlayPauseButton.SetNormalTexture
|
||||
StopwatchPlayPauseButton.SetNormalTexture = function(self, tex)
|
||||
orig(self, tex)
|
||||
local texture = self:GetNormalTexture()
|
||||
texture:SetDesaturated(1)
|
||||
texture:SetTexCoord(.25, .75, .28, .78)
|
||||
end
|
||||
SkinButton(StopwatchPlayPauseButton, nil, nil, nil, StopwatchPlayPauseButton:GetNormalTexture())
|
||||
StopwatchPlayPauseButton:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Up") -- initiate update texture
|
||||
StopwatchPlayPauseButton:ClearAllPoints()
|
||||
StopwatchPlayPauseButton:SetWidth(20)
|
||||
StopwatchPlayPauseButton:SetHeight(20)
|
||||
StopwatchPlayPauseButton:SetPoint("RIGHT", StopwatchResetButton, "LEFT", -2*bpad, 0)
|
||||
|
||||
CreateBackdrop(StopwatchTicker)
|
||||
StopwatchTicker:ClearAllPoints()
|
||||
StopwatchTicker:SetWidth(70)
|
||||
StopwatchTicker:SetHeight(16)
|
||||
StopwatchTicker:SetPoint("RIGHT", StopwatchPlayPauseButton, "LEFT", -2*border + 1, 0)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -0,0 +1,11 @@
|
||||
pfUI:RegisterSkin("tracking", "tbc", function ()
|
||||
MINIMAP_TRACKING_FRAME:DisableDrawLayer("ARTWORK") -- hide border
|
||||
SkinButton(MINIMAP_TRACKING_FRAME, nil, nil, nil, MiniMapTrackingIcon, true)
|
||||
MINIMAP_TRACKING_FRAME:SetHeight(tonumber(C.appearance.minimap.tracking_size) + 10)
|
||||
MINIMAP_TRACKING_FRAME:SetWidth(tonumber(C.appearance.minimap.tracking_size) + 10)
|
||||
MINIMAP_TRACKING_FRAME:ClearAllPoints()
|
||||
MINIMAP_TRACKING_FRAME:SetPoint("TOPLEFT", pfUI.minimap, "TOPLEFT", -10, -10)
|
||||
MINIMAP_TRACKING_FRAME:SetFrameStrata("LOW")
|
||||
MINIMAP_TRACKING_FRAME:SetParent(UIParent)
|
||||
UpdateMovable(MINIMAP_TRACKING_FRAME)
|
||||
end)
|
||||
Reference in New Issue
Block a user