Thread Tools Display Modes
10-15-05, 02:06 PM   #1
shouryuu
A Chromatic Dragonspawn
 
shouryuu's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 150
Changing Action Bar Art

EDIT: Unless you really feel like helping out don't bother answering, I'll have a copy of wowo By friday and will be tinkering with it then.


Well silly me, I go on curse-gaming, click bars and what's the first addon I see? ArtHider So I've managed to hide the art with these
MainMenuBarLeftEndCap:Hide();
MainMenuBarRightEndCap:Hide()

I now need to resize my bar because my art is a slightly bigger than the one by blizzard, so I do the following

MainMenuBar:SetWidth(992)

Now I need to center it, I doubt there is any command to do that so I'll just clear all points, and set it's bottom right point the height I want the bar to be. In other words, this

MainMenuBar:ClearAllPoints();
MainMenuBar:SetPoint("BOTTOM", "UIParent", "BOTTOM", 53, 12);

So now I need to create my new art frames.
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">

<Script file="ForumArt.lua"/>

<!-- Horizontal Tray Template  -->
<Frame name="ForumArtFrame" frameStrata="BACKGROUND" parent="UIParent" >
	<Scripts>
  		<OnLoad>ForumArt_OnLoad();</OnLoad>
	</Scripts>
  </Frame>
</Frame>
<!-- New Left Finger-->
<Frame name="LeftFinger" parent="UIParent"> --Or maybe parent="ForumArtFrame"?--
	<Layers>
		<Layer level="ARTWORK">
			<Texture name="LeftFingerTexture" file="SomePathHere">
				<TexCoords left="0" right="0" top="0" bottom="0"/>
				--Not sure what that does but I'm guessing it places the texture within the frame--
			</Texture>
		</Layer>
	</Layers>
	<Anchors>
		<Anchor point="TOPRIGHT">;</Anchor>
	</Anchors>
</Frame>
<Frame name="RightFinger" parent="UIParent">
	<Layers>
		<Layer level="ARTWORK">
			<Texture name="RightFingerTexture" file="SomePathHere">
				<TexCoords left="0" right="0" top="0" bottom="0"/>
				--Not sure what that does but I'm guessing it places the texture within the frame--
			</Texture>
		</Layer>
	</Layers>
	<Anchors>
		<Anchor point="TOPRIGHT">;</Anchor>
	</Anchors>
</Frame>
And add something like

Code:
ForumArt_OnLoad()

--blah blah blah---

       LeftFinger:ClearAllPoints;
       LeftFinger:SetPoints(UIParent", "BOTTOM",0,0);
       RightFinger:ClearAllPoints;
       RightFinger:SetPoints(UIParent", "BOTTOM",0,0);
end
Would that not work because my frames are not defined yet? Would that not work because my code is wrong? I'm not sure I trully understand the parents section and what "BOTTOM" is in SetPoints...


I'm sorry for asking things I could test out by playing the game, but it isn't instaled on my computer, my accout has expired, so there is no way for me to test this... I'm just doing this out of curiosity, I hate not understanding something I've though of Thanks guys !

Last edited by shouryuu : 10-17-05 at 12:38 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Changing Action Bar Art


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