View Single Post
08-04-10, 05:58 AM   #9
weasoug
A Flamescale Wyrmkin
 
weasoug's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 127
Thumbs up

thanks for the help guys.

and on the note of

Code:
function GetMinimapShape() return 'SQUARE' end
I used this as I wanted a way for the addons to load with that shape.

so I have everything all working by. when you log in you just have to do the command to change the shape and image. that I think is what I might keep it that way.

unless there is a way. I can still get the addon to load a default shape/

but to do that. I think I would have to add aload more of junk maybe like

Code:
function GetMinimapShape() return 'SQUARE' end
        m:SetMaskTexture([[Interface\AddOns\wMmap\texture\mask-square]])
        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")
keep it as S as I could use the T format. but I think the set texture would conflict with the commands. as would SetMaskTexture when the command is used.

if there is a way i can cut this down.


I am very greatful for all your time. and Vrul /bow

but i have taken heed of what you have said. as till im happy with the in game change shape. im going to update my main addon with some of the info you have said. well a clean up as it was.

from
local minimapshape = "round"
--square or round shape of minimap

if minimapshape == "round" then
function GetMinimapShape() return "ROUND" end
m:SetMaskTexture("Interface\\AddOns\\wMmap\\texture\\Mask-ROUND")

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")

elseif minimapshape == "square" then
function GetMinimapShape() return "SQUARE" end
m:SetMaskTexture("Interface\\AddOns\\wMmap\\texture\\Mask.blp")

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")
end
to

--square or round shape of minimap
local minimapshape = "round"

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

if minimapshape == "round" then
function GetMinimapShape() return "ROUND" end
m:SetMaskTexture("Interface\\AddOns\\wMmap\\texture\\Mask-ROUND")
t:SetTexture("Interface\\AddOns\\wMmap\\texture\\round")

elseif minimapshape == "square" then
function GetMinimapShape() return "SQUARE" end
m:SetMaskTexture("Interface\\AddOns\\wMmap\\texture\\Mask.blp")
t:SetTexture("Interface\\AddOns\\wMmap\\texture\\square")
end
of what is a lot better. less code. hehe
i cant see what to use other then minimapshape. for this.

as people who use my addon. they have to change
local minimapshape = "round"
to
local minimapshape = "square"
thats why i have been asking for help. so people can use a command in game.

and with the code you have helped me with. works well.
I feel would be too soon. to update my addon with hthat code. till all commands are in with help.

but as always im greatful. and i cant wait for other cool ways or edits i can aadd to your code.

it might even get to the ppoint where i just use you command style as it is. if i cant work out how to tell the addon to load a defult.
im not big into SV as most still is saved in the layout-local

Last edited by weasoug : 08-04-10 at 06:32 AM.
  Reply With Quote