mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
1
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = getfenv()
|
local _G = getfenv()
|
||||||
local print, tostring = print, tostring
|
|
||||||
local format = string.format
|
local format = string.format
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local GetMouseFocus = GetMouseFocus
|
local GetMouseFocus = GetMouseFocus
|
||||||
|
|||||||
@@ -211,9 +211,6 @@ function AB:CreateBar(id)
|
|||||||
self:HookScript(button, "OnLeave", "Button_OnLeave")
|
self:HookScript(button, "OnLeave", "Button_OnLeave")
|
||||||
end
|
end
|
||||||
|
|
||||||
MainMenuBar:SetParent(bar)
|
|
||||||
BonusActionBarFrame:SetParent(bar)
|
|
||||||
|
|
||||||
bar.buttons = bar.actionButtons
|
bar.buttons = bar.actionButtons
|
||||||
|
|
||||||
bar:RegisterEvent("UPDATE_BONUS_ACTIONBAR")
|
bar:RegisterEvent("UPDATE_BONUS_ACTIONBAR")
|
||||||
@@ -226,11 +223,9 @@ function AB:CreateBar(id)
|
|||||||
end
|
end
|
||||||
|
|
||||||
bar.buttons = bar.bonusButtons
|
bar.buttons = bar.bonusButtons
|
||||||
|
-- ShowBonusActionBar();
|
||||||
ShowBonusActionBar()
|
|
||||||
else
|
else
|
||||||
HideBonusActionBar()
|
-- HideBonusActionBar();
|
||||||
|
|
||||||
for i = 1, NUM_ACTIONBAR_BUTTONS do
|
for i = 1, NUM_ACTIONBAR_BUTTONS do
|
||||||
bar.buttons[i]:SetParent(E.HiddenFrame)
|
bar.buttons[i]:SetParent(E.HiddenFrame)
|
||||||
end
|
end
|
||||||
@@ -244,7 +239,6 @@ function AB:CreateBar(id)
|
|||||||
for i = 1, NUM_ACTIONBAR_BUTTONS do
|
for i = 1, NUM_ACTIONBAR_BUTTONS do
|
||||||
local button = _G[self["barDefaults"]["bar"..id].name.."Button"..i]
|
local button = _G[self["barDefaults"]["bar"..id].name.."Button"..i]
|
||||||
bar.buttons[i] = button
|
bar.buttons[i] = button
|
||||||
bar.buttons[i].id = id
|
|
||||||
|
|
||||||
self:HookScript(button, "OnEnter", "Button_OnEnter")
|
self:HookScript(button, "OnEnter", "Button_OnEnter")
|
||||||
self:HookScript(button, "OnLeave", "Button_OnLeave")
|
self:HookScript(button, "OnLeave", "Button_OnLeave")
|
||||||
@@ -369,21 +363,13 @@ end
|
|||||||
|
|
||||||
function AB:DisableBlizzard()
|
function AB:DisableBlizzard()
|
||||||
MainMenuBar:EnableMouse(false)
|
MainMenuBar:EnableMouse(false)
|
||||||
E:Kill(MainMenuExpBar)
|
|
||||||
E:Kill(MainMenuBarMaxLevelBar)
|
|
||||||
E:Kill(MainMenuBarPerformanceBarFrame)
|
|
||||||
|
|
||||||
BonusActionBarFrame:EnableMouse(false)
|
|
||||||
BonusActionBarFrame:DisableDrawLayer("OVERLAY")
|
|
||||||
|
|
||||||
PetActionBarFrame:EnableMouse(false)
|
PetActionBarFrame:EnableMouse(false)
|
||||||
|
|
||||||
ShapeshiftBarFrame:EnableMouse(false)
|
ShapeshiftBarFrame:EnableMouse(false)
|
||||||
|
|
||||||
local elements = {
|
local elements = {
|
||||||
--MainMenuBar,
|
MainMenuBar,
|
||||||
MainMenuBarArtFrame,
|
MainMenuBarArtFrame,
|
||||||
--BonusActionBarFrame,
|
BonusActionBarFrame,
|
||||||
PetActionBarFrame,
|
PetActionBarFrame,
|
||||||
ShapeshiftBarFrame,
|
ShapeshiftBarFrame,
|
||||||
ShapeshiftBarLeft,
|
ShapeshiftBarLeft,
|
||||||
@@ -463,12 +449,7 @@ function AB:ActionButton_Update()
|
|||||||
self:StyleButton(this)
|
self:StyleButton(this)
|
||||||
end
|
end
|
||||||
|
|
||||||
function AB:Initialize()
|
function AB:ActionButton_GetPagedID(button)
|
||||||
self.db = E.db.actionbar
|
|
||||||
|
|
||||||
if E.private.actionbar.enable ~= true then return end
|
|
||||||
|
|
||||||
function ActionButton_GetPagedID(button)
|
|
||||||
if button.isBonus and CURRENT_ACTIONBAR_PAGE == 1 then
|
if button.isBonus and CURRENT_ACTIONBAR_PAGE == 1 then
|
||||||
local offset = GetBonusBarOffset()
|
local offset = GetBonusBarOffset()
|
||||||
if offset == 0 and ElvUI_Bar1 and ElvUI_Bar1.lastBonusBar then
|
if offset == 0 and ElvUI_Bar1 and ElvUI_Bar1.lastBonusBar then
|
||||||
@@ -491,6 +472,11 @@ function AB:Initialize()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function AB:Initialize()
|
||||||
|
self.db = E.db.actionbar
|
||||||
|
|
||||||
|
if E.private.actionbar.enable ~= true then return end
|
||||||
|
|
||||||
self:DisableBlizzard()
|
self:DisableBlizzard()
|
||||||
|
|
||||||
self:SetupMicroBar()
|
self:SetupMicroBar()
|
||||||
@@ -503,6 +489,7 @@ function AB:Initialize()
|
|||||||
--self:LoadKeyBinder()
|
--self:LoadKeyBinder()
|
||||||
|
|
||||||
self:SecureHook("ActionButton_Update")
|
self:SecureHook("ActionButton_Update")
|
||||||
|
self:RawHook("ActionButton_GetPagedID")
|
||||||
-- self:SecureHook("PetActionBar_Update", "UpdatePet")
|
-- self:SecureHook("PetActionBar_Update", "UpdatePet")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user