WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   MainMenuBar (https://www.wowinterface.com/forums/showthread.php?t=43963)

10leej 08-25-12 07:39 PM

MainMenuBar
 
So I'm working on finalizing my actionbar addon "Bobbars" and for the most part it works. Unfortunately the MainMenuBar seems to extend farther off to the right than that I want even when I'm hiding it.
I'm guessing it's because I'm hiding "MainMenuBarTexture" because everytime I go to hide "MainMenuArtFrame" the entire bar seems to go hide when I do that.

Here's my code so far
Code:

--[[CONFIG]]--
--MainBar (Bar 1)
local Bar1Scale = 0.8
local Bar1Point = "BOTTOM"
local Bar1X = 256
local Bar1Y = 0
--Bar 2 (Position is relative to Bar 1)
local Bar2X = 0
local Bar2Y = 6
--Bar 3 (Position is relative to Bar 1)
local Bar3X = 0
local Bar3Y = 4
--Cause the MainMenuBar wants to be special
local a = CreateFrame("Frame")
a:SetScript("OnEvent",function(self,event)
        if event == "PLAYER_LOGIN" then
                MainMenuBarLeftEndCap:Hide()
                MainMenuBarRightEndCap:Hide()
                MainMenuBarTexture0:Hide()
                MainMenuBarTexture1:Hide()
                MainMenuBarTexture2:Hide()
                MainMenuBarTexture3:Hide()
                MainMenuBar:SetScale(Bar1Scale)
                MainMenuBar:ClearAllPoints()
                MainMenuBar:SetPoint(Bar1Point,Bar1X,Bar1Y)
                MainMenuBar.SetPoint = function() end
                MultiBarBottomLeft:ClearAllPoints()
                MultiBarBottomLeft:SetPoint("BOTTOMLEFT",ActionButton1,"TOPLEFT",Bar2X,Bar2Y)
                MultiBarBottomLeft.SetPoint = function() end
                MultiBarBottomRight:ClearAllPoints()
                MultiBarBottomRight:SetPoint("BOTTOMLEFT",MultiBarBottomLeft,"TOPLEFT",Bar3X,Bar3Y)
                MultiBarBottomRight.SetPoint = function() end
                PetActionBarFrame:ClearAllPoints()
                PetActionBarFrame:SetPoint("BOTTOM",MultiBarBottomRight,"TOP",0,6)
                PetActionBarFrame.SetPoint = function() end
                MainMenuMaxLevelBar0:Hide()
                MainMenuMaxLevelBar1:Hide()
                MainMenuMaxLevelBar2:Hide()
                MainMenuMaxLevelBar3:Hide()
                MainMenuBarBackpackButton:Hide()
                CharacterBag0Slot:Hide()
                CharacterBag1Slot:Hide()
                CharacterBag2Slot:Hide()
                CharacterBag3Slot:Hide()
                MainMenuExpBar:ClearAllPoints()
                MainMenuExpBar:SetPoint("TOPLEFT",UIParent,0,0)
                MainMenuExpBar:SetScale(.8)
                MainMenuExpBar:Hide()
                StanceButton1:ClearAllPoints()
                StanceButton1:SetPoint("TOPLEFT",UIParent,0,0)
        end
end)
a:RegisterEvent("PLAYER_LOGIN")
a:RegisterEvent("PLAYER_ENTERING_WORLD")
a:RegisterEvent("ADDON_LOADED")

I know there's a way we can work with using RegisterStateDriver or soemthing liek that but I can't remember for the life of me.

zork 08-26-12 02:33 AM

They changed the whole default first ActionBar. The ActionButtons of the first bar are now anchored to the MainMenuBarArtFrame.

Btw that MainMenuBar.SetPoint is a really bad idea. It will taint your code in combat. (The bar will move when entering a vehicle with vehicleui)

10leej 08-26-12 02:52 AM

Quote:

Originally Posted by zork (Post 260323)
They changed the whole default first ActionBar. The ActionButtons of the first bar are now anchored to the MainMenuBarArtFrame.

Btw that MainMenuBar.SetPoint is a really bad idea. It will taint your code in combat. (The bar will move when entering a vehicle with vehicleui)

Ah does it? Have had much playing time so I haven't tested much >.>

zork 08-26-12 02:56 AM

You may want to check:
http://code.google.com/p/rothui/sour...arStyler/core/

It took me quite some time to update the mod for MoP. I'm using the state driver aswell. That is because in a petbattle or a vehicle you want to hide the actionbars.

10leej 08-26-12 02:59 AM

Funny I actually just downloaded that to look at that, lmao

10leej 08-26-12 03:37 AM

Looks like I got it working fairly well so far, just gotta remake Bar2 and 3 (MultiBarLeft and MultiBarRight)

Thanks for the help zork

10leej 08-27-12 02:29 AM

nevermind turns out it was a spelling error on my part


All times are GMT -6. The time now is 08:26 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI