WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Released AddOns (https://www.wowinterface.com/forums/forumdisplay.php?f=9)
-   -   KC_RadialButton help wanted (https://www.wowinterface.com/forums/showthread.php?t=1168)

Abdo 07-03-05 02:14 AM

KC_RadialButton help wanted
 
Hey guys!

I am trying to add my own mini-map buttons linked to addons (not included originally) using KC_RadialButton. I can (for the love of god) just not get them to show!

Ohnestly, I have no idea what I am doing but usually I can atleast change/add/mod code to get it to work. I have read "RadialButton Walkthrough for Addon Makers.txt" over and over again but no. Nothing. :eek:

If some of you superscripters have a minute extra - could you please post a supereasy guide made for retards like me, with example(s).

Thanks
Roger

PS.
A way to bind mini-map buttons to macros would be awesome too.

Kaelten 07-03-05 02:54 AM

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

Abdo 07-03-05 03:00 AM

Wow! Thanks for the fast answer, I'll get on it right away :)

Kaelten 07-03-05 03:04 AM

np anytime.

KC_Radialbuttons was written with the users and mind but was also meant to be extenable.

when 0.90 comes out I think it'll be even more so.

Abdo 07-03-05 03:15 AM

It works!

Thank you so much! :D

Now I´m gonna open up The Gimp and make me some funky buttons too, you made my day :)

Abdo 07-03-05 03:39 AM

Is there also a way to link "original" things like for example my Enchanting or Engineering?

Garzu 07-03-05 05:42 AM

Thanks
 
Thank you for helping out.

Abdo, please post or upload the buttons you make, im even more clueless in code and stuff than you are, but I love minimap buttons, it looks so neat and cool =D And they are useful of course.

Like what is target frame's name?

Im sooo looking forward to your 0.90 edition, I simply love the concept of this addon.

Abdo 07-03-05 10:09 AM

Quote:

Originally Posted by Garzu
Thank you for helping out.

Abdo, please post or upload the buttons you make, im even more clueless in code and stuff than you are, but I love minimap buttons, it looks so neat and cool =D And they are useful of course.

Like what is target frame's name?

Im sooo looking forward to your 0.90 edition, I simply love the concept of this addon.

What I did was searching the addon dir with wingrep (http://www.wingrep.com/) for anything called frame. Then i just used the one that looked right :cool:

For example; for AutoDecline I used:
Code:

KC_RadialButton:RegisterButton(this, "ADOptionsFrame", 168);
Other then that I just followed the instructions ;)

It doesnt seem to work 100% though, like DefendYourself refused to work even though I tried with all the "frames" I could fine, but you cant have it all, hehe...

I still dont know if one can use like /slash command, macros or "originals" and bind them to buttons on the mini-map but I dont think so.

Good luck Garzu :rolleyes:

EDIT:
It would be so very neat if one could add /slash command to them, then it would be extreamly easy and all addons would work.


All times are GMT -6. The time now is 08:29 PM.

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