View Single Post
07-03-05, 02:54 AM   #2
Kaelten
Jack's raging bile duct
 
Kaelten's Avatar
Featured
Join Date: May 2005
Posts: 782
hi, well I hate to say it but I changes some small things since I originally wrote that walkthrough.

the 'easy' way to get this to work is to do as follows

take the following code:

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/FrameXML/UI.xsd">

	<!-- Radial Buttons -->
	<Button name="KC_RadialButton_BotD" parent="Minimap" toplevel="true" frameStrata="LOW">
		<Size>
			<AbsDimension x="24" y="24"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="Minimap" relativePoint="RIGHT">
				<Offset>
					<AbsDimension x="0" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
		 	KC_RadialButton:RegisterButton(this, "TFKillStatsFrame", 168);
				this:Hide();
			</OnLoad>
			<OnShow>
				KC_RadialButton:ButtonMover(this:GetName(), false);
		 	this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
			</OnShow>
			<OnClick>
				KC_RadialButton:ClickHandler(arg1, this:GetName());
			</OnClick>
			<OnEnter>
		 	KC_RadialButton:ToolTipSetup(this, "~/ Book of the Dead \\~", "This addon collects and displays numeric data ", "relating to your pvp encounters.");
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<NormalTexture file="Interface\AddOns\KC_RadialButton\images\KC_RadialButton_BotD_Up"/>
		<PushedTexture file="Interface\AddOns\KC_RadialButton\images\KC_RadialButton_BotD_Down"/>
		<HighlightTexture file="Interface\AddOns\KC_RadialButton\images\KC_RadialButton_Glow" alphaMode="ADD"/>
	</Button>
</Ui>
You will need to change the following segments:

Code:
<Button name="KC_RadialButton_BotD" parent="Minimap" toplevel="true" frameStrata="LOW">
You need to give the button an unique name. KC_RadialButton_ADDONNAME should work.

Code:
KC_RadialButton:RegisterButton(this, "TFKillStatsFrame", 168);
You'll need to change the TFKillStatsFrame there to be the name of the frame your trying to make KCR open for you.

you can leave the 168 alone if you want - thats the default angle at which the button will show up.

Code:
KC_RadialButton:ToolTipSetup(this, "~/ Book of the Dead \\~", "This addon collects and displays numeric data ", "relating to your pvp encounters.");
the first argument must be this, the second one should be the name of the addon, then you can have as many as you want describing the addon functionality, each argument will be a seperate line, well actually you can only have 22 of these I think and then you'll break the tooltip.

Code:
<NormalTexture file="Interface\AddOns\KC_RadialButton\images\KC_RadialButton_BotD_Up"/>
		<PushedTexture file="Interface\AddOns\KC_RadialButton\images\KC_RadialButton_BotD_Down"/>
you can leave these alone if you want or if you want to change the image file make it point to one you want, there are several ones inside the image directory.

k now you'll save this in a xml file, say your where making one of these for auction it you'd save it as KC_RadialButton_AuctionIt.xml and place it inside the KC_RadialButton directory.

now for the last part.

you'll need to open the KC_RadialButton.toc and add the new file's name to the list there.

and that should make the button show up.

Now if your wanting to make a button to package with a mod for you to distribute there are other ways to do it, if you need to know let me know.

In the back of my mind I've been playing with what I need to do with KCR and I have a new format thats going to come out in the .90 version thats due sometime in the next month or two.

It will involve alot less scripting on the users part and people should even be able add buttons without ever writing a line of code(you'll still need to know the target frame's Name)

well If you have any more questions let me know,

Kaelten
__________________
WowAce.com & CurseForge.com Adminstrator
Developer of Ace3, OneBag3, and many other addons and libraries
Project lead and Mac developer for the Curse Client

Anyone that needs what they want
And doesn't want what they need
I want nothing to do with
  Reply With Quote