Skip to content

Commit

Permalink
pull dev into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Mar 29, 2024
2 parents 42dd9b4 + 35323f7 commit 48c95d1
Show file tree
Hide file tree
Showing 12 changed files with 291 additions and 139 deletions.
1 change: 1 addition & 0 deletions ElvUI/Core/Defaults/Global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ G.datatexts = {
Hit = { Label = '', NoLabel = false, decimalLength = 1 },
Intellect = { Label = '', NoLabel = false},
['Item Level'] = { onlyEquipped = false, rarityColor = true },
Leech = { Label = '', NoLabel = false, decimalLength = 1 },
Location = { showZone = true, showSubZone = true, showContinent = false, color = 'REACTION', customColor = {r = 1, g = 1, b = 1} },
Mastery = { Label = '', NoLabel = false, decimalLength = 1 },
MovementSpeed = { Label = '', NoLabel = false, decimalLength = 1 },
Expand Down
4 changes: 2 additions & 2 deletions ElvUI/Core/Defaults/Profile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2095,7 +2095,7 @@ P.unitframe = {
enable = true,
threatStyle = 'GLOW',
orientation = 'LEFT',
visibility = '[@raid6,exists][nogroup] hide;show',
visibility = '[@raid6,exists][@party1,noexists] hide;show',
growthDirection = 'UP_RIGHT',
horizontalSpacing = 0,
verticalSpacing = 3,
Expand Down Expand Up @@ -2476,7 +2476,7 @@ P.unitframe.units.raidpet.debuffs.priority = 'Blacklist,Personal,Boss,Whitelist,
P.unitframe.units.raidpet.growthDirection = 'DOWN_RIGHT'
P.unitframe.units.raidpet.height = 30
P.unitframe.units.raidpet.numGroups = 8
P.unitframe.units.raidpet.visibility = '[group:raid] show; hide'
P.unitframe.units.raidpet.visibility = '[@raid1,exists] show; hide'

P.unitframe.units.tank.buffs.numrows = 1
P.unitframe.units.tank.buffs.perrow = 6
Expand Down
15 changes: 12 additions & 3 deletions ElvUI/Core/Modules/ActionBars/ActionBars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,11 @@ do
[E.Retail and 'PossessActionBar' or 'PossessBarFrame'] = true
}

local untaintButtons = {
MultiCastActionButton = (E.Wrath and E.myclass ~= 'SHAMAN') or nil,
OverrideActionBarButton = E.Wrath or nil
}

if E.Wrath then -- Wrath TotemBar needs to be handled by us
_G.UIPARENT_MANAGED_FRAME_POSITIONS.MultiCastActionBarFrame = nil
end
Expand Down Expand Up @@ -1201,12 +1206,16 @@ do
AB:SecureHook('BlizzardOptionsPanel_OnEvent')
end

if E.Wrath and E.myclass ~= 'SHAMAN' then
for i = 1, 12 do
local button = _G['MultiCastActionButton'..i]
for name in next, untaintButtons do
local index = 1
local button = _G[name..index]
while button do
button:Hide()
button:UnregisterAllEvents()
button:SetAttribute('statehidden', true)

index = index + 1
button = _G[name..index]
end
end

Expand Down
43 changes: 42 additions & 1 deletion ElvUI/Core/Modules/ActionBars/MicroBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ local gsub = gsub
local assert = assert
local unpack = unpack
local tinsert = tinsert
local strfind = strfind
local CreateFrame = CreateFrame
local UpdateMicroButtonsParent = UpdateMicroButtonsParent
local RegisterStateDriver = RegisterStateDriver
Expand Down Expand Up @@ -335,6 +336,7 @@ function AB:UpdateMicroButtons()

AB:HandleBackdropMultiplier(microBar, backdropSpacing, db.buttonSpacing, db.widthMult, db.heightMult, anchorUp, anchorLeft, horizontal, lastButton, anchorRowButton)
AB:HandleBackdropMover(microBar, backdropSpacing)
AB:HandleTicketButton()

if microBar.mover then
if db.enabled then
Expand Down Expand Up @@ -365,6 +367,40 @@ function AB:HandleCharacterPortrait()
self.Portrait:SetInside()
end

function AB:HasTicketButton()
local microMenu = _G.MicroMenu
if microMenu and microMenu.UpdateHelpTicketButtonAnchor then
return microMenu
end
end

function AB:HandleTicketButton()
if AB:HasTicketButton() then
AB:UpdateHelpTicketButtonAnchor()
end
end

function AB:UpdateHelpTicketButtonAnchor()
local ticket = _G.HelpOpenWebTicketButton
if not ticket then return end

local first = _G[AB.MICRO_BUTTONS[1]]
if first then
local db = AB.db.microbar
local size = ((db.keepSizeRatio and db.buttonSize) or db.buttonHeight) or 20
local height = (size / 2) + 7
local _, y = first:GetCenter()
local middle = E.screenHeight * 0.5

ticket:ClearAllPoints()
ticket:SetPoint('CENTER', first, 0, (y and y >= middle) and -height or height)
end
end

function AB:MicroBar_PostDrag()
AB:HandleTicketButton()
end

function AB:SetupMicroBar()
microBar:CreateBackdrop(AB.db.transparent and 'Transparent', nil, nil, nil, nil, nil, nil, nil, 0)
microBar:Point('TOPLEFT', E.UIParent, 'TOPLEFT', 4, -48)
Expand Down Expand Up @@ -399,6 +435,11 @@ function AB:SetupMicroBar()

AB:SecureHook('UpdateMicroButtons')

local microMenu = AB:HasTicketButton()
if microMenu then
hooksecurefunc(microMenu, 'UpdateHelpTicketButtonAnchor', AB.UpdateHelpTicketButtonAnchor)
end

if _G.ResetMicroMenuPosition then
_G.ResetMicroMenuPosition()
else
Expand All @@ -418,5 +459,5 @@ function AB:SetupMicroBar()
_G.PVPMicroButtonTexture:SetAlpha(0)
end

E:CreateMover(microBar, 'MicrobarMover', L["Micro Bar"], nil, nil, nil, 'ALL,ACTIONBARS', nil, 'actionbar,microbar')
E:CreateMover(microBar, 'MicrobarMover', L["Micro Bar"], nil, nil, AB.MicroBar_PostDrag, 'ALL,ACTIONBARS', nil, 'actionbar,microbar')
end
Loading

0 comments on commit 48c95d1

Please sign in to comment.