View Single Post
09-10-10, 10:40 AM   #11
weasoug
A Flamescale Wyrmkin
 
weasoug's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 127
Post

with this working fine. people keep asking to have the shape they use in game to save. ive been trying a few things.

and maybe i was thinknig usen
Code:
t:SetUserPlaced(true)
Code:
t:RegisterEvent("ADDON_LOADED")
as i read that saves to the layout-local

but unsure if that would work due to i think i remember it dont work for frame maken.

like

Code:
wmshape = "arrow"
--top of code

function Getwmshape()
	return wmshape
end

local t = Minimap:CreateTexture(nil, 'ARTWORK')
t:SetPoint('TOPLEFT', Minimap, 'TOPLEFT', -12, 12)
t:SetPoint('BOTTOMRIGHT', Minimap, 'BOTTOMRIGHT', 12, -12)
t:SetBlendMode('BLEND')
t:RegisterEvent("ADDON_LOADED") 
local wname = "|cff3399FFw|rMmap|r"
local function CList(msg)
	msg = msg:lower()
	if msg == "gold" or msg == "gloss" or msg == "arrow" or msg == "tec" then
		Minimap:SetMaskTexture([[Interface\AddOns\wMmap\texture\mask-]] .. msg)
		t:SetTexture([[Interface\AddOns\wMmap\texture\]] .. msg)
                t:SetUserPlaced(true) 
		print(wname.."|cFF00FFFF: Shape set to " .. msg .. ".|r")
	else
	print(wname..": Type |cFF00FFFF /wm shape|r here. Example: |cFFFFFF00/wm gold|r or |cFFFFFF00/wm gloss|r or |cFFFFFF00/wm arrow|r or |cFFFFFF00/wm tec|r.")
	end
end

SLASH_CList1 = "/wm"
SlashCmdList["CList"] = CList

CList(wmshape)
any help would be very welcome
  Reply With Quote