Thread Tools Display Modes
08-02-12, 12:22 AM   #1
Qupe
A Warpwood Thunder Caller
 
Qupe's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 92
Rectangle Minimap

I'm trying to recreate Dawn's rectangle minimap.

Before straight up copy/pasting his code, I hack'n'slashed it by setting the size. This worked but ended up stretching the map's textures.

ex:


Went ahead and copy/pasted code in and got this:



code:
Lua Code:
  1. -----------
  2. -- style --
  3. -----------
  4. local _, class = UnitClass('player')
  5. local color = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]           
  6.  
  7. Minimap:SetSize(172*scale, 172*scale)
  8. Minimap:SetMaskTexture(mediaFolder.."rectangle")
  9. Minimap:SetHitRectInsets(0, 0, 24*scale, 24*scale)
  10. Minimap:SetFrameLevel(4)
  11. Minimap:ClearAllPoints()
  12. Minimap:SetPoint(position, UIParent, position_x, position_y)
  13. Minimap:SetScale(scale)
  14.  
  15. --LFDSearchStatus:SetClampedToScreen(true)
  16.  
  17. BorderFrame = CreateFrame("Frame", nil, Minimap)
  18. BorderFrame:SetPoint("TOPLEFT", Minimap, "TOPLEFT", -1, -(21*scale))
  19. BorderFrame:SetPoint("BOTTOMRIGHT", Minimap, "BOTTOMRIGHT", 1, (21*scale)) 
  20. BorderFrame:SetBackdrop(backdrop)
  21. if not classColoredBorder then
  22.     BorderFrame:SetBackdropBorderColor(unpack(brdcolor))
  23. else
  24.     BorderFrame:SetBackdropBorderColor(color.r, color.g, color.b)
  25. end
  26. BorderFrame:SetBackdropColor(unpack(backdropcolor))
  27. BorderFrame:SetFrameLevel(6)

I understand the general gist of how the mask is covering the bits of the map, making it a "rectangle" without stretching the actual map texture.

What I don't understand is why a) it's green and b) the top/bottom bits of the map aren't being masked.

This is the addon I'm trying to recreate:
http://www.wowinterface.com/download...0-dRecMap.html

I don't think I missed any code or stuff that is actually masking the map (I didn't include the config code at the top of the addon that sets stuff like bg textures, scale, etc...).

I attached the entirety of the code; the lua file is basically Dawn's map with stuff commented out that errors. I don't intend to use anything from that code besides what styles the map, so just disregard any of the out of date stuff.

Basically, is it still possible to do this? If it is, has something changed which makes the styling in this addon non-functional?

Thanks!
Attached Files
File Type: lua Minimap.lua (5.8 KB, 517 views)
__________________
Quse UI
WoW :: EQ2
  Reply With Quote
08-02-12, 01:42 AM   #2
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
As far as i know, aside from the code, green always means the texture didnt load correctly. Be aware that the actual texture's size needs to be power of 2, like 32x64 or 128x256 for example.
__________________
◘◘ Author of MiirGui Texture Pack - [Core] [Blue] [Grey] ◘◘
  Reply With Quote
08-02-12, 02:21 AM   #3
eiszeit
A Chromatic Dragonspawn
 
eiszeit's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 154
Rectangle minimap would be exactly what I need in my UI.
I'll try to get it running at home, too. Maybe I can help.
__________________
Lyn • I'm a mess of unfinished thoughts
  Reply With Quote
08-02-12, 02:28 AM   #4
Qupe
A Warpwood Thunder Caller
 
Qupe's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 92
Originally Posted by Miiru View Post
As far as i know, aside from the code, green always means the texture didnt load correctly. Be aware that the actual texture's size needs to be power of 2, like 32x64 or 128x256 for example.
If green means the texture didn't load then something may have changed since this addon worked? I haven't modified the texture at all. By default it's 256x256 and it's Dawn's original texture for an addon that worked at some point, so I'm assuming the issue isn't with the texture (+? I really don't have any idea, just going on what I see).

Originally Posted by eiszeit View Post
Rectangle minimap would be exactly what I need in my UI.
I'll try to get it running at home, too. Maybe I can help.
You stylish mofo, you! (also, yes please!).

I can't upload a .tga file? If I could I'd drop the texture file in here for people to look at. If there's something else I can upload it as/a trusted location, please let me know. If not, it's available in the addon link in the OP.
__________________
Quse UI
WoW :: EQ2
  Reply With Quote
08-02-12, 02:42 AM   #5
eiszeit
A Chromatic Dragonspawn
 
eiszeit's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 154
Originally Posted by Qupe View Post
You stylish mofo, you! (also, yes please!).
<3

You could put it on Dropbox or so? That's where I put all my stuff about four years now.
__________________
Lyn • I'm a mess of unfinished thoughts
  Reply With Quote
08-02-12, 03:23 AM   #6
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Lua Code:
  1. Minimap:SetMaskTexture(mediaFolder.."rectangle")
mediaFolder is set correctly ?
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Rectangle Minimap


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