Thread Tools Display Modes
08-25-12, 07:39 PM   #1
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
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.
__________________
Tweets YouTube Website

Last edited by 10leej : 08-25-12 at 07:43 PM.
  Reply With Quote
08-26-12, 02:33 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
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)
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
08-26-12, 02:52 AM   #3
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Originally Posted by zork View Post
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 >.>
__________________
Tweets YouTube Website
  Reply With Quote
08-26-12, 02:56 AM   #4
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
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.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
08-26-12, 02:59 AM   #5
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Funny I actually just downloaded that to look at that, lmao
__________________
Tweets YouTube Website
  Reply With Quote
08-26-12, 03:37 AM   #6
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Looks like I got it working fairly well so far, just gotta remake Bar2 and 3 (MultiBarLeft and MultiBarRight)

Thanks for the help zork
__________________
Tweets YouTube Website
  Reply With Quote
08-27-12, 02:29 AM   #7
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
nevermind turns out it was a spelling error on my part
__________________
Tweets YouTube Website

Last edited by 10leej : 08-27-12 at 02:52 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » MainMenuBar


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off