Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function UpdateMultiActionBar(frame, var, pageVar, cb)
- if (var and IsNormalActionBarState()) then
- frame:SetShown(true);
- VIEWABLE_ACTION_BAR_PAGES[pageVar] = nil;
- else
- frame:SetShown(false);
- VIEWABLE_ACTION_BAR_PAGES[pageVar] = 1;
- end
- if (cb) then
- cb(var);
- end
- end
- local function setupUIBars()
- MainMenuBarArtFrame.LeftEndCap:Hide();MainMenuBarArtFrame.RightEndCap:Hide()
- MainMenuBarArtFrameBackground:Hide();
- MainMenuBarArtFrame.PageNumber:Hide();
- MicroButtonAndBagsBar.MicroBagBar:Hide();
- ActionBarUpButton:Hide()
- ActionBarDownButton:Hide()
- MultiBarBottomLeft:ClearAllPoints()
- MultiBarBottomLeft:SetScale(1)
- MultiBarBottomLeft:SetPoint("CENTER",1,85)
- MultiBarBottomLeft.SetPoint = function() end
- ActionButton1:ClearAllPoints()
- ActionButton1:SetScale(1)
- ActionButton1:SetPoint("CENTER",-230.625,45)
- ActionButton1.SetPoint = function() end
- MultiBarBottomRight:ClearAllPoints()
- MultiBarBottomRight:SetScale(1)
- MultiBarBottomRight:SetPoint("CENTER",-124,124)
- MultiBarBottomRight.SetPoint = function() end
- MultiBarBottomRightButton7:ClearAllPoints()
- MultiBarBottomRightButton7:SetPoint("RIGHT", "MultiBarBottomRight", "RIGHT", 38.5 , -1)
- MultiBarBottomRightButton7.SetPoint = function() end
- PetActionBarFrame:ClearAllPoints()
- PetActionBarFrame:SetScale(0.8)
- PetActionBarFrame:SetPoint("CENTER", -91.5, 12.5)
- PetActionBarFrame.SetPoint = function() end
- CharacterBag3Slot:Hide()
- CharacterBag2Slot:Hide()
- CharacterBag1Slot:Hide()
- CharacterBag0Slot:Hide()
- MainMenuBarBackpackButton:ClearAllPoints()
- MainMenuBarBackpackButton:SetScale(0.88)
- MainMenuBarBackpackButton:SetPoint("RIGHT", "UIParent", -1, 255)
- MainMenuBarBackpackButton:Show()
- StanceButton1:ClearAllPoints()
- StanceButton1:SetPoint("CENTER", "UIParent",-315,-330)
- StanceButton1:SetScale(0.75)
- StanceButton2:SetScale(0.75)
- StanceButton3:SetScale(0.75)
- StanceButton4:SetScale(0.75)
- StanceButton5:SetScale(0.75)
- StanceButton6:SetScale(0.75)
- CharacterMicroButton:ClearAllPoints()
- CharacterMicroButton:SetScale(0.85)
- CharacterMicroButton:SetPoint("BOTTOMLEFT","UIParent", -2, -8)
- EJMicroButton:ClearAllPoints()
- EJMicroButton:SetScale(0.85)
- EJMicroButton:SetPoint("BOTTOMLEFT","UIParent", 23, -8)
- SpellbookMicroButton:ClearAllPoints()
- SpellbookMicroButton:SetScale(0.85)
- SpellbookMicroButton:SetPoint("BOTTOMLEFT","UIParent", 48, -8)
- TalentMicroButton:ClearAllPoints()
- TalentMicroButton:SetScale(0.85)
- TalentMicroButton:SetPoint("BOTTOMLEFT","UIParent", 73, -8)
- GuildMicroButton:ClearAllPoints()
- GuildMicroButton:SetScale(0.85)
- GuildMicroButton:SetPoint("BOTTOMLEFT","UIParent", 98, -8)
- LFDMicroButton:ClearAllPoints()
- LFDMicroButton:SetScale(0.85)
- LFDMicroButton:SetPoint("BOTTOMLEFT","UIParent", 123, -8)
- MainMenuMicroButton:ClearAllPoints()
- MainMenuMicroButton:SetScale(0.85)
- MainMenuMicroButton:SetPoint("BOTTOMLEFT","UIParent", 148, -8)
- CollectionsMicroButton:ClearAllPoints()
- CollectionsMicroButton:SetScale(0.85)
- CollectionsMicroButton:SetPoint("BOTTOMLEFT","UIParent", 173, -8)
- AchievementMicroButton:ClearAllPoints()
- AchievementMicroButton:SetScale(0.85)
- AchievementMicroButton:SetPoint("BOTTOMLEFT","UIParent", 198, -8)
- QuestLogMicroButton:ClearAllPoints()
- QuestLogMicroButton:SetScale(0.85)
- QuestLogMicroButton:SetPoint("BOTTOMLEFT","UIParent", 223, -8)
- StoreMicroButton:ClearAllPoints()
- StoreMicroButton:SetScale(0.85)
- StoreMicroButton:SetPoint("BOTTOMLEFT","UIParent", 248, -8)
- EJMicroButton:Show()
- CharacterMicroButton:Show()
- SpellbookMicroButton:Show()
- TalentMicroButton:Show()
- AchievementMicroButton:Show()
- QuestLogMicroButton:Show()
- GuildMicroButton:Show()
- MainMenuMicroButton:Show()
- StoreMicroButton:Show()
- LFDMicroButton:Show()
- CollectionsMicroButton:Show()
- end
- setupUIBars()
- local animationsCount, animations = 5, {}
- local animationNum = 1
- local frame, texture, alpha1, scale1, scale2, rotation2
- for i = 1, animationsCount do
- frame = CreateFrame("Frame")
- texture = frame:CreateTexture() texture:SetTexture('Interface\\Cooldown\\star4') texture:SetAlpha(0) texture:SetAllPoints() texture:SetBlendMode("ADD")
- animationGroup = texture:CreateAnimationGroup()
- alpha1 = animationGroup:CreateAnimation("Alpha") alpha1:SetFromAlpha(0) alpha1:SetToAlpha(1) alpha1:SetDuration(0) alpha1:SetOrder(1)
- scale1 = animationGroup:CreateAnimation("Scale") scale1:SetScale(1.0, 1.0) scale1:SetDuration(0) scale1:SetOrder(1)
- scale2 = animationGroup:CreateAnimation("Scale") scale2:SetScale(1.5, 1.5) scale2:SetDuration(0.3) scale2:SetOrder(2)
- rotation2 = animationGroup:CreateAnimation("Rotation") rotation2:SetDegrees(90) rotation2:SetDuration(0.3) rotation2:SetOrder(2)
- animations[i] = {frame = frame, animationGroup = animationGroup}
- end
- local AnimateButton = function(self)
- if not self:IsVisible() then return true end
- local animation = animations[animationNum]
- local frame = animation.frame
- local animationGroup = animation.animationGroup
- frame:SetFrameStrata("HIGH")
- frame:SetFrameLevel(20)
- frame:SetAllPoints(self)
- animationGroup:Stop()
- animationGroup:Play()
- animationNum = (animationNum % animationsCount) + 1
- return true
- end
- hooksecurefunc('MultiActionButtonDown', function(bname, id)
- AnimateButton(_G[bname..'Button'..id])
- end)
- hooksecurefunc('PetActionButtonDown', function(id)
- local button
- if PetActionBarFrame then
- if id > NUM_PET_ACTION_SLOTS then return end
- button = _G["PetActionButton"..id]
- if not button then return end
- end
- return
- AnimateButton(button)
- end)
- hooksecurefunc('ActionButtonDown', function(id)
- local button
- if C_PetBattles.IsInBattle() then
- if PetBattleFrame then
- if id > NUM_BATTLE_PET_HOTKEYS then return end
- button = PetBattleFrame.BottomFrame.abilityButtons[id]
- if id == BATTLE_PET_ABILITY_SWITCH then
- button = PetBattleFrame.BottomFrame.SwitchPetButton;
- elseif id == BATTLE_PET_ABILITY_CATCH then
- button = PetBattleFrame.BottomFrame.CatchButton;
- end
- if not button then return end
- end
- return
- end
- if OverrideActionBar and OverrideActionBar:IsShown() then
- if id > NUM_OVERRIDE_BUTTONS then return end
- button = _G["OverrideActionBarButton"..id]
- else
- button = _G["ActionButton"..id]
- end
- if not button then return end
- AnimateButton(button)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement