Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 325daae

Browse files
committed
fix pet bar position for various UI scales and configurations
1 parent 7ee5233 commit 325daae

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

RetailUI/RetailUI.lua

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -235,36 +235,50 @@ end
235235

236236
local function Update_ActionBars()
237237
if not InCombatLockdown() then
238-
local petBar = {x=36, y=2}
238+
local petBar = {x=-732, y=44}
239239
local stanceBar = {x=21, y=41}
240240

241241
if MultiBarBottomLeft:IsShown() then
242242
if StanceBarFrame:IsShown() then
243-
petBar.x = -225
243+
petBar.x = -400
244244
if not MultiBarBottomRight:IsShown() then
245-
petBar.x = -510
245+
petBar.x = -338
246+
stanceBar.x = 0
247+
end
248+
else
249+
if not MultiBarBottomRight:IsShown() then
250+
petBar.x = -477
246251
end
247252
end
248253
else
249-
petBar.y = -2
250254
stanceBar.x = 30
251255
stanceBar.y = -5
252-
if StanceBarFrame:IsShown() and not MultiBarBottomRight:IsShown() then
253-
petBar.x = -510
254-
SlidingActionBarTexture0:SetAlpha(0)
255-
SlidingActionBarTexture1:SetAlpha(0)
256+
if StanceBarFrame:IsShown() then
257+
if not MultiBarBottomRight:IsShown() then
258+
petBar.x = -338
259+
petBar.y = 0
260+
SlidingActionBarTexture0:SetAlpha(0)
261+
SlidingActionBarTexture1:SetAlpha(0)
262+
end
263+
else
264+
if MultiBarBottomRight:IsShown() then
265+
petBar.y = 0
266+
else
267+
petBar.x = -477
268+
petBar.y = 0
269+
end
256270
end
257271
end
258272

259-
PetActionButton1:SetPoint("BOTTOMLEFT", PetActionButton1:GetParent(), "BOTTOMLEFT", petBar.x, petBar.y)
260-
StanceBarFrame:SetPoint("BOTTOMLEFT", MainMenuBar, "TOPLEFT", stanceBar.x, stanceBar.y)
261-
262273
if MultiBarBottomRight:IsShown() then
263274
ActivateLongBar()
264275
else
265276
ActivateShortBar()
266277
end
267278

279+
PetActionButton1:SetPoint("BOTTOMLEFT", MainMenuBar, "TOPRIGHT", petBar.x, petBar.y)
280+
StanceBarFrame:SetPoint("BOTTOMLEFT", MainMenuBar, "TOPLEFT", stanceBar.x, stanceBar.y)
281+
268282
Update_StatusBars()
269283
end
270284
end

0 commit comments

Comments
 (0)