Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- Action Bar Move
- for i,v in ipairs{"BottomRight", "Right"} do
- for i = 2, 12 do
- local n = "MultiBar"..v.."Button"
- local btn = _G[n..i]
- btn:ClearAllPoints()
- btn:SetPoint("LEFT", n..i - 1, "RIGHT", 6, 0)
- end
- end
- TalentMicroButton:ClearAllPoints()
- CharacterMicroButton:ClearAllPoints()
- CharacterMicroButton:SetPoint("Bottom", TalentMicroButton, "Top", 0, 0)
- ActionBarUpButton:SetPoint("Right", ActionButton1, "Left", -4.5, 9)
- MultiBarBottomLeftButton1:ClearAllPoints()
- MultiBarBottomLeftButton1:SetPoint("Bottom", ActionButton1, "Top", 0, 10.5)
- MultiBarBottomRightButton1:SetPoint("Left", ActionButton12, "Right", 6, 0)
- MultiBarRightButton1:ClearAllPoints()
- MultiBarRightButton1:SetPoint("Left", MultiBarBottomLeftButton12, "Right", 6, 0)
- MultiBarLeftButton1:ClearAllPoints()
- MultiBarLeftButton1:SetPoint("Top", MultiBarRight, 0, -2.5)
- local function BarFix()
- MainMenuBarArtFrame.PageNumber:SetPoint("Right", ActionBarUpButton, "Left", -5.5, -9.5)
- if not InCombatLockdown() then
- MainMenuBar:SetMovable(true)
- MainMenuBar:SetUserPlaced(true)
- if (StatusTrackingBarManager:GetNumberVisibleBars() == 2) then
- MainMenuBar:SetPoint("Bottom", -107.5, 19)
- elseif (StatusTrackingBarManager:GetNumberVisibleBars() == 1) then
- MainMenuBar:SetPoint("Bottom", -107.5, 14)
- else
- MainMenuBar:SetPoint("Bottom", -107.5, 0)
- end
- MainMenuBar:SetMovable(false)
- end
- end
- hooksecurefunc(MainMenuBar, "SetPositionForStatusBars", function()
- BarFix()
- end)
- local U = CreateFrame("Frame")
- U:RegisterEvent("PLAYER_REGEN_ENABLED")
- U:SetScript("OnEvent",function(event, ...)
- BarFix()
- end)
- hooksecurefunc(StatusTrackingBarManager, "LayoutBar", function(self, bar, barWidth, isTopBar, isDouble)
- if not self.largeSize then
- if (isDouble) then
- self.SingleBarSmallUpper:Hide();
- self.SingleBarLargeUpper:Show();
- self.SingleBarSmall:Hide();
- self.SingleBarLarge:Show();
- else
- self.SingleBarSmall:Hide();
- self.SingleBarLarge:Show();
- end
- end
- bar:ClearAllPoints()
- if (isDouble) then
- self.SingleBarLargeUpper:SetWidth(1024);
- self.SingleBarLargeUpper:SetPoint("CENTER", bar, 0, 0);
- self.SingleBarLarge:SetWidth(1024);
- self.SingleBarLarge:SetPoint("CENTER", bar, 0, -9);
- if (isTopBar) then
- bar:SetPoint("Bottom", 107.5, -10)
- bar.StatusBar:SetWidth(1024);
- bar.StatusBar:SetPoint("RIGHT", bar.StatusBar:GetParent(), "RIGHT", 0, 0);
- bar:SetWidth(1024);
- bar.OverlayFrame:SetPoint("TOPLEFT", bar, "TOPLEFT", 0, -1)
- else
- bar:SetPoint("Bottom", 107.5, -19)
- bar.StatusBar:SetWidth(1024);
- bar.StatusBar:SetPoint("RIGHT", bar.StatusBar:GetParent(), "RIGHT", 0, 0);
- bar:SetWidth(1024);
- bar.OverlayFrame:SetPoint("TOPLEFT", bar, "TOPLEFT", 0, -3)
- end
- bar.StatusBar.Background:SetAlpha(0.5)
- else
- self.SingleBarLarge:SetWidth(1024);
- self.SingleBarLarge:SetPoint("CENTER", bar, 0, 0); -- 4
- bar:SetPoint("Bottom", 107.5, -14)-- -3
- bar.StatusBar:SetWidth(1024);
- bar.StatusBar:SetPoint("RIGHT", bar.StatusBar:GetParent(), "RIGHT", 0, 0);
- bar:SetWidth(1024);
- bar.OverlayFrame:SetPoint("TOPLEFT", bar, "TOPLEFT", 0, -2) --0, -4
- bar.StatusBar.Background:SetAlpha(0.5)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement