mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 15:46:56 +00:00
76 lines
1.8 KiB
Lua
76 lines
1.8 KiB
Lua
SLASH_RELOAD1 = '/rl';
|
|
function SlashCmdList.RELOAD(msg, editbox)
|
|
ReloadUI()
|
|
end
|
|
|
|
SLASH_PFUI1 = '/pfui';
|
|
function SlashCmdList.PFUI(msg, editbox)
|
|
if pfUI.gui:IsShown() then
|
|
pfUI.gui:Hide()
|
|
else
|
|
pfUI.gui:Show()
|
|
end
|
|
end
|
|
|
|
pfUI = CreateFrame("Frame",nil,UIParent)
|
|
pfUI.backdrop = {
|
|
bgFile = "Interface\\AddOns\\pfUI\\img\\bg", tile = true, tileSize = 8,
|
|
edgeFile = "Interface\\AddOns\\pfUI\\img\\border", edgeSize = 8,
|
|
insets = {left = 0, right = 0, top = 0, bottom = 0},
|
|
}
|
|
|
|
pfUI.backdrop_gitter = {
|
|
bgFile = "Interface\\AddOns\\pfUI\\img\\gitter", tile = true, tileSize = 8,
|
|
}
|
|
|
|
pfUI.backdrop_col = {
|
|
bgFile = "Interface\\AddOns\\pfUI\\img\\bg", tile = true, tileSize = 8,
|
|
edgeFile = "Interface\\AddOns\\pfUI\\img\\border_col", edgeSize = 8,
|
|
insets = {left = 0, right = 0, top = 0, bottom = 0},
|
|
}
|
|
|
|
pfUI.playerDB = {}
|
|
|
|
pfUI.config = {
|
|
["unitframes"] = {
|
|
animation_speed = 1,
|
|
buff_size = "22",
|
|
debuff_size = "22",
|
|
layout = "default",
|
|
["player"] = {
|
|
width = 200,
|
|
height = 50,
|
|
pheight = 10,
|
|
},
|
|
["target"] = {
|
|
width = 200,
|
|
height = 50,
|
|
pheight = 10,
|
|
},
|
|
},
|
|
["bars"] = {
|
|
icon_size = "22",
|
|
border = 2,
|
|
}
|
|
}
|
|
|
|
pfUI.cache = CreateFrame("Frame",nil,UIParent)
|
|
pfUI.cache:RegisterEvent("PLAYER_ENTERING_WORLD")
|
|
pfUI.cache:SetScript("OnEvent", function()
|
|
_, class = UnitClass("player")
|
|
local color = RAID_CLASS_COLORS[class]
|
|
pfUI.cache.class_r, pfUI.cache.class_g, pfUI.cache.class_b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
|
|
|
|
end)
|
|
|
|
message = function (msg)
|
|
DEFAULT_CHAT_FRAME:AddMessage("|cffcccc33INFO: |cffffff55"..msg)
|
|
end
|
|
|
|
ScriptErrors:SetScript("OnShow", function(msg)
|
|
DEFAULT_CHAT_FRAME:AddMessage("|cffcc3333ERROR: |cffff5555"..ScriptErrors_Message:GetText())
|
|
ScriptErrors:Hide()
|
|
end)
|
|
|
|
pfUI.uf = CreateFrame("Frame",nil,UIParent)
|