Browse Source

Initial commit

master
Sergio Álvarez 3 years ago
commit
3a6438dd51
  1. 12
      Gio_ElvUI.toc
  2. 7
      README.md
  3. 55
      main.lua

12
Gio_ElvUI.toc

@ -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

7
README.md

@ -0,0 +1,7 @@
ElvUI: https://git.tukui.org/elvui/elvui
My Mod:
- Player power bar color + bg
- Class bar color + bg

55
main.lua

@ -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…
Cancel
Save