Initial commit
This commit is contained in:
commit
3a6438dd51
|
@ -0,0 +1,12 @@
|
|||
## Interface: 80000
|
||||
## Title: Gio |cff00ffffElvUI|r
|
||||
## Author: Gio
|
||||
## Credit: Blazeflack, Elv, WA Discord
|
||||
## Version: 1.0
|
||||
## Notes: Cosas nasis de la ElvUI
|
||||
## RequiredDeps: ElvUI
|
||||
## LoadOnDemand: 1
|
||||
## LoadWith: ElvUI
|
||||
## X-eMail: xergio@gmail.com
|
||||
|
||||
main.lua
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
ElvUI: https://git.tukui.org/elvui/elvui
|
||||
|
||||
My Mod:
|
||||
|
||||
- Player power bar color + bg
|
||||
- Class bar color + bg
|
|
@ -0,0 +1,55 @@
|
|||
|
||||
local E, L, V, P, G = unpack(ElvUI)
|
||||
local _G = _G
|
||||
local UF = E:GetModule("UnitFrames")
|
||||
local hooksecurefunc = hooksecurefunc
|
||||
local MAX_COMBO_POINTS = MAX_COMBO_POINTS
|
||||
|
||||
local color = {
|
||||
r = 1,
|
||||
g = 1,
|
||||
b = 1
|
||||
}
|
||||
|
||||
local bgColor = {
|
||||
r = 0.1,
|
||||
g = 0.1,
|
||||
b = 0.1
|
||||
}
|
||||
|
||||
-- PowerBar
|
||||
local function hook_PostUpdatePower(self)
|
||||
self:SetStatusBarColor(color.r, color.g, color.b)
|
||||
self.bg:SetVertexColor(bgColor.r, bgColor.g, bgColor.b)
|
||||
end
|
||||
|
||||
local f = CreateFrame("Frame")
|
||||
f:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
f:SetScript("OnEvent", function(self)
|
||||
self:UnregisterEvent("PLAYER_ENTERING_WORLD")
|
||||
|
||||
local unitframe = _G["ElvUF_Player"]
|
||||
|
||||
local power = unitframe and unitframe.Power
|
||||
if power then
|
||||
hooksecurefunc(power, "PostUpdate", hook_PostUpdatePower)
|
||||
end
|
||||
end)
|
||||
|
||||
-- ClassBar
|
||||
local function hook_Configure_ClassBar(self, frame)
|
||||
local bars = frame[frame.ClassBar]
|
||||
if not bars then return end
|
||||
|
||||
if (frame.ClassBar == 'ClassPower' or frame.ClassBar == 'Runes') then
|
||||
local maxClassBarButtons = max(UF.classMaxResourceBar[E.myclass] or 0, MAX_COMBO_POINTS)
|
||||
for i = 1, maxClassBarButtons do
|
||||
if i <= frame.MAX_CLASS_BAR and bars[i].bg then
|
||||
bars[i]:SetStatusBarColor(color.r, color.g, color.b)
|
||||
bars[i].bg:SetVertexColor(bgColor.r, bgColor.g, bgColor.b)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hooksecurefunc(UF, "Configure_ClassBar", hook_Configure_ClassBar)
|
Loading…
Reference in New Issue