View Single Post
08-04-10, 10:21 AM   #10
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
The first line should be near the top of your file, the rest can be at the end:
Code:
local minimapshape = 'ROUND'

function GetMinimapShape()
	return minimapshape
end

local t = m:CreateTexture(nil, 'ARTWORK')
t:SetPoint('TOPLEFT', m, 'TOPLEFT', -12, 12)
t:SetPoint('BOTTOMRIGHT', m, 'BOTTOMRIGHT', 12, -12)
t:SetBlendMode('BLEND')

local function SHAPE(msg)
	msg = msg:upper()
	if msg == 'SQUARE' then
		minimapshape = msg
		m:SetMaskTexture([[Interface\AddOns\wMmap\texture\Mask]])
		t:SetTexture([[Interface\AddOns\wMmap\texture\square]])
		print(wname.."|cFF00FFFF: Shape set to square.|r")
	elseif msg == 'ROUND' then
		minimapshape = msg
		m:SetMaskTexture([[Interface\AddOns\wMmap\texture\Mask-ROUND]])
		t:SetTexture([[Interface\AddOns\wMmap\texture\round]])
		print(wname.."|cFF00FFFF: Shape set to round.|r")
	else
		print(wname.."|cFF00FFFF: Type /shape round or square to change the shape.|r")
	end
end

SLASH_SHAPE1 = "/shape"
SlashCmdList["SHAPE"] = SHAPE

SHAPE(minimapshape)
  Reply With Quote