WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Step by Step, a newbie's plea. (https://www.wowinterface.com/forums/showthread.php?t=2480)

Rapture 11-23-05 01:13 PM

Step by Step, a newbie's plea.
 
Greetings,

I'm a bit overwhelmed by writting AddOns, but I'm determined to learn. I've read tutorial after tutorial and though they make since, they don't seem to help. So I'm wondering if you (the gurus) could give me step by step instructions for writting a simple AddOn with comments as to why/how you did things.

The AddOn I'd like to create is a MiniMap AddOn that does a few things:
  1. Make the MiniMap frame moveable, hideable (I know it's in the game already), and scalable.
  2. Change the artwork for it, along with options for pre-determined "schemes".
  3. Change the shape (Circle, Box, Diamond, and maybe Octogon).
  4. Change the shape, size, and alpha of the buttons around the MiniMap.

I know the very basics, like creating a TOC file and what goes in it, but I have no idea how to structure the XML file(s). Also, I'm a big confused on how the LUA code correlates to the XML script tags.

Thanx in advance,
Rapture

noraj 11-23-05 03:58 PM

just make the clock example on
MMhell's Tutorial "Writing your first add-on"
google "first add-on"

If you have any programming experience you should be able to pick it up after that using
wow wiki

btw all the stuff your trying to do can be done with Discord Art and Discord Frame Modifier

cept the minimap thats always gonna be a circle afaik maybe you could cut the sides off( and some info) to make it look like another shape bu underneath it will still be a circle

Gello 11-23-05 04:32 PM

I'm a strong believer that the best way to learn how to make mods is to make mods that don't touch the default UI.

This is really not an easy mod to start out with. It's not trivial. That said:

1. Make the MiniMap frame moveable, hideable (I know it's in the game already), and scalable.

Movable:
1. MinimapCluster:SetMovable(1)
2. Get the mouse down/up events for the MinimapCluster
3. Insert your functions to move it

Hideable: Under what conditions do you want to hide it? MinimapCluster:Hide(), MinimapCluster:Show() will hide/show it. The conditions would be the coding bit.

Scalable: MinimapCluster:SetScale(scale) ie, MinimapCluster:SetScale(0.5)

2. Change the artwork for it, along with options for pre-determined "schemes".

Put all the replacement textures in your addon folder and then :SetTexture to each artwork element. This will only work for elements that have a name. (I believe all do in the minimap cluster now)

3. Change the shape (Circle, Box, Diamond, and maybe Octogon).

Make the artwork above cover more of the minimap in the desired shape. The round minimap is untouchable by mods.

4. Change the shape, size, and alpha of the buttons around the MiniMap.

You can change the size with :SetHeight and :SetWidth. The shape you can overlay an image but you generally won't be able to alter the existing artwork of non-default buttons without enumerating the child windows it and hoping the textures are named. To get the buttons you can enumerate through the child windows of the Minimap frame.


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

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