View Single Post
11-23-05, 04:32 PM   #3
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
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.

Last edited by Gello : 11-23-05 at 04:43 PM.
  Reply With Quote