Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-03-10, 12:33 PM   #1
weasoug
A Flamescale Wyrmkin
 
weasoug's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 127
Post Minimap Shape help

Hi there all. I wanted to update my addon so you can do a command to change the shape.

this is what I have so far. I don't get any errors but when I do /wm round or /wm square my textures over lap the other.

so when you log in i have it set like this

Code:
function GetMinimapShape() return 'SQUARE' end
        local s = m:CreateTexture(nil,"square")
	s:SetTexture("Interface\\AddOns\\wMmap\\texture\\square")
	s:SetPoint("TOPLEFT", m, "TOPLEFT", -12, 12)
	s:SetPoint("BOTTOMRIGHT", m, "BOTTOMRIGHT", 12, -12)
	s:SetBlendMode("BLEND")

then when you want to change the shape I added this code

Code:
local function SHAPE(msg)
	local msg = strlower(msg)
	
	if msg == "square" then
		m:SetMaskTexture("Interface\\AddOns\\wMmap\\texture\\Mask.blp")
		function GetMinimapShape() return "SQUARE" end
        local s = m:CreateTexture(nil,"square")
	s:SetTexture("Interface\\AddOns\\wMmap\\texture\\square")
	s:SetPoint("TOPLEFT", m, "TOPLEFT", -12, 12)
	s:SetPoint("BOTTOMRIGHT", m, "BOTTOMRIGHT", 12, -12)
	s:SetBlendMode("BLEND")
		print(wname.."|cFF00FFFF: Set to Square.|r")
	elseif msg == "round" then
		Minimap:SetMaskTexture("Interface\\AddOns\\wMmap\\texture\\Mask-ROUND")
		function GetMinimapShape() return "ROUND" end
        local r = m:CreateTexture(nil,"round")
	r:SetTexture("Interface\\AddOns\\wMmap\\texture\\round")
	r:SetPoint("TOPLEFT", m, "TOPLEFT", -12, 12)
	r:SetPoint("BOTTOMRIGHT", m, "BOTTOMRIGHT", 12, -12)
	r:SetBlendMode("BLEND")
		print(wname.."|cFF00FFFF: Set to Round.|cFF00FFFF")
	else
		print(wname.."|cFF00FFFF: Type /shape round or square to change the shape|cFF00FFFF")
	end
end

SLASH_SHAPE1 = "/shape"
SlashCmdList["SHAPE"] = SHAPE
an image to see




thanks for your time

Last edited by weasoug : 08-03-10 at 12:48 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Minimap Shape help


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