I just finished my proof of concept for drawing a map....
this is done with labels and 4 custom graphics....
it will need logic written into it and tied into a database but mapping is possible now
function TESTMAP()
WindowWidth, WindowHeight = getMainWindowSize();
gfx_path = "/home/woodapple/gfx";
nwse = gfx_path.. "/nwse.png"
ns = gfx_path.. "/ns.png"
nesw = gfx_path.. "/swne.png"
ew = gfx_path.. "/ew.png"
grid = 30
WIDE = 5
HIGH = 5
RoomOffSet = 5
RoomSize = grid-(RoomOffSet*2)
x = 1
y = 1
while y <= HIGH do
while x <= WIDE do
SX = (WindowWidth-18)-(grid * WIDE)+((x-1)*grid)
SY = (y*grid)-grid
--nw
hideWindow("nw"..x.."."..y)
createLabel("nw"..x.."."..y,SX,SY,10,10,1);
setBackgroundImage("nw"..x.."."..y,nwse );
setBackgroundColor("nw"..x.."."..y, 0,0,0,0);
showWindow("nw"..x.."."..y);
--n
hideWindow("n"..x.."."..y)
createLabel("n"..x.."."..y,SX+10,SY,10,10,1);
setBackgroundImage("n"..x.."."..y,ns );
setBackgroundColor("n"..x.."."..y, 0,0,0,0);
showWindow("n"..x.."."..y);
--ne
hideWindow("ne"..x.."."..y)
createLabel("ne"..x.."."..y,SX+20,SY,10,10,1);
setBackgroundImage("ne"..x.."."..y,nesw );
setBackgroundColor("ne"..x.."."..y, 0,0,0,0);
showWindow("ne"..x.."."..y);
--w
hideWindow("w"..x.."."..y)
createLabel("w"..x.."."..y,SX,SY+10,10,10,1);
setBackgroundImage("w"..x.."."..y,ew );
setBackgroundColor("w"..x.."."..y, 0,0,0,0);
showWindow("w"..x.."."..y);
--e
hideWindow("e"..x.."."..y)
createLabel("e"..x.."."..y,SX+20,SY+10,10,10,1);
setBackgroundImage("e"..x.."."..y,ew );
setBackgroundColor("e"..x.."."..y, 0,0,0,0);
showWindow("e"..x.."."..y);
--sw
hideWindow("sw"..x.."."..y)
createLabel("sw"..x.."."..y,SX,SY+20,10,10,1);
setBackgroundImage("sw"..x.."."..y,nesw );
setBackgroundColor("sw"..x.."."..y, 0,0,0,0);
showWindow("sw"..x.."."..y);
--s
hideWindow("s"..x.."."..y)
createLabel("s"..x.."."..y,SX+10,SY+20,10,10,1);
setBackgroundImage("s"..x.."."..y,ns);
setBackgroundColor("s"..x.."."..y, 0,0,0,0);
showWindow("s"..x.."."..y);
--s
hideWindow("se"..x.."."..y)
createLabel("se"..x.."."..y,SX+20,SY+20,10,10,1);
setBackgroundImage("se"..x.."."..y,nwse);
setBackgroundColor("se"..x.."."..y, 0,0,0,0);
showWindow("se"..x.."."..y);
--Room
hideWindow("Room"..x.."."..y)
createLabel("Room"..x.."."..y,SX+RoomOffSet,SY+RoomOffSet,RoomSize,RoomSize,1);
setBackgroundColor("Room"..x.."."..y,79,121,66,255);
showWindow("Room"..x.."."..y);
x=x+1
end--while x
x=1
y=y+1
end--while y
end
...I did notice that although you can hide/change any one of the labels they cannot be moved.... once they have been drawn on the screen you cannot hide them and create them at a new location, this is not a huge deal but does mean that if you want to resize this map(change how many rooms it displays) you have to make the change, close mudlet and reopen it.