Skip to content

Commit

Permalink
165 actionbars rewrite activehidden logic (#166)
Browse files Browse the repository at this point in the history
* ActivateAllActionbars()

* Add Actionbar.activate to Bar2/3/4/5
  • Loading branch information
Karl-HeinzSchneider committed Jul 28, 2024
1 parent 19f291d commit 0e07fc2
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions Modules/Actionbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ local defaults = {
buttons = 12,
padding = 2,
alwaysShow = true,
activate = true,
hideMacro = false,
hideKeybind = false
},
Expand All @@ -71,6 +72,7 @@ local defaults = {
buttons = 12,
padding = 2,
alwaysShow = true,
activate = true,
hideMacro = false,
hideKeybind = false
},
Expand All @@ -88,6 +90,7 @@ local defaults = {
buttons = 12,
padding = 2,
alwaysShow = true,
activate = true,
hideMacro = false,
hideKeybind = false
},
Expand All @@ -105,6 +108,7 @@ local defaults = {
buttons = 12,
padding = 2,
alwaysShow = true,
activate = true,
hideMacro = false,
hideKeybind = false
},
Expand Down Expand Up @@ -490,6 +494,16 @@ local function SetActionBarToggle(index, value)
MultiActionBar_Update();
end

local function ActivateAllActionbars()
SHOW_MULTI_ACTIONBAR_1 = true
SHOW_MULTI_ACTIONBAR_2 = true
SHOW_MULTI_ACTIONBAR_3 = true
SHOW_MULTI_ACTIONBAR_4 = true
SetActionBarToggles(1, 1, 1, 1, 1)
SetActionBarToggles(true, true, true, true, true)
MultiActionBar_Update()
end

local function GetActionBarToggle(index)
return select(index, GetActionBarToggles());
end
Expand Down Expand Up @@ -674,7 +688,7 @@ local function GetBarOption(n)
}

for k, v in pairs(moreOptions) do opt.args[k] = v end
elseif n <= 5 then
elseif n <= 5 and false then
local moreOptions = {
activate = {
type = 'toggle',
Expand Down Expand Up @@ -1505,6 +1519,7 @@ function Module:OnEnable()

-- not the best solution, override global CVAR and let DF UI handle everything
C_CVar.SetCVar("alwaysShowActionBars", 1)
ActivateAllActionbars()

Module.Temp = {}
Module.UpdateRangeHooked = false
Expand Down Expand Up @@ -2389,7 +2404,8 @@ function Module.ChangePossessBar()
end

function frame:OnEvent(event, arg1)
-- print('event', event)
-- print('event', event)
if event == 'PLAYER_ENTERING_WORLD' then ActivateAllActionbars() end
end
frame:SetScript('OnEvent', frame.OnEvent)

Expand Down Expand Up @@ -3823,6 +3839,7 @@ function Module.Wrath()
-- Module.ChangePossessBar()

frame:RegisterEvent('PLAYER_REGEN_ENABLED')
frame:RegisterEvent("PLAYER_ENTERING_WORLD")

Module.ChangeGryphon()
-- Module.DrawActionbarDeco()
Expand Down Expand Up @@ -3850,6 +3867,7 @@ function Module.Era()
-- Module.ChangePossessBar()

frame:RegisterEvent('PLAYER_REGEN_ENABLED')
frame:RegisterEvent("PLAYER_ENTERING_WORLD")

Module.ChangeGryphon()
-- Module.DrawActionbarDeco()
Expand Down

0 comments on commit 0e07fc2

Please sign in to comment.