Thread Tools Display Modes
12-13-08, 04:58 PM   #1
hypehuman
A Deviate Faerie Dragon
 
hypehuman's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 17
Can we add buttons to existing Blizzard frames?

I'm trying to add a button to the macro window, but nothing happened. Here's my xml:

Code:
<Button name="$parentOpenSDM" parent="MacroFrame" inherits="UIPanelButtonTemplate" text="Super Duper Macro">
	<Size x="80" y="22" />
	<Anchors> 
		<Anchor point="RIGHT" relativeTo="MacroFrameCloseButton" relativePoint="LEFT" />
	</Anchors> 
	<Scripts>
		<OnClick>     </OnClick>
	</Scripts>
</Button>
Any reason why it shouldn't work?

Last edited by hypehuman : 12-13-08 at 11:23 PM. Reason: removed $
  Reply With Quote
12-13-08, 05:46 PM   #2
Zyonin
Coffee powered Kaldorei
 
Zyonin's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 1,443
As in like another icon to choose from?

If so (and your icon is in a tga or blp format), just create a new folder in your Interface folder called Icons and then drop your custom Icons in there. They should then show up in your icons selection for your macros. I have used this method in the past.
__________________
Twitter
  Reply With Quote
12-13-08, 08:10 PM   #3
hypehuman
A Deviate Faerie Dragon
 
hypehuman's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 17
Originally Posted by Lykofos View Post
As in like another icon to choose from?

If so (and your icon is in a tga or blp format), just create a new folder in your Interface folder called Icons and then drop your custom Icons in there. They should then show up in your icons selection for your macros. I have used this method in the past.
Actually what I wanted to do was create a button and put it on one of the frames created by Blizzard's default UI. Specifically, I am trying to add another button to the default macro window that will open to my addon window.
  Reply With Quote
12-13-08, 08:17 PM   #4
Cralor
Mmm... cookies!!!
 
Cralor's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 772
relativeTo="$MacroFrameCloseButton"

should be

relativeTo="$parentCloseButton" or relativeTo="MacroFrameCloseButton"
__________________
Never be satisfied with satisfactory.
  Reply With Quote
12-13-08, 08:20 PM   #5
Psoewish
A Scalebane Royal Guard
 
Psoewish's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 447
I know 100% sure this is possible, as I've seen plenty of addons that do it. So don't give up the search.

I'm gonna try and find a few addons that you may be able to use as reference material (as I can't code myself so I can't help directly ).

EDIT: I type slow lol >.>

Try what Cralor said first, no point in me looking for an addon if the solution is already there ^_^
  Reply With Quote
12-13-08, 11:24 PM   #6
hypehuman
A Deviate Faerie Dragon
 
hypehuman's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 17
I removed the $ and it still doesn't work :'(
  Reply With Quote
07-21-09, 09:16 PM   #7
tardmrr
Lua Ninja
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 133
The macro ui is LoadOnDemand so the MacroFrame doesn't exist on login. You can either force it to load right away by making the macro ui a dependency of your addon (not reccomended) or make your addon LoD and use LoadsWith attribute to make it load with the macro ui.

Last edited by tardmrr : 07-21-09 at 09:56 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Can we add buttons to existing Blizzard frames?

Thread Tools
Display Modes

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