if not nav then
nav = {}
end
function mouseup(t, id)
if id == "North" then
Send("say turn north")
end
end
--Create our nav window
if not nav.win then
--Create our window
WindowCreate("shipNav", 0, 0, 260, 300, 8, 1, ColourNameToRGB("black"))
--Load our images
WindowLoadImage ("shipNav", "moveCompassBackground", "C:/Program Files/MUSHclient/worlds/plugins/ShipNav/moveCompassBack.bmp")
WindowLoadImage ("shipNav", "windBackground", "C:/Program Files/MUSHclient/worlds/plugins/ShipNav/windInfoBackground.bmp")
--Draw stuff
WindowDrawImage("shipNav", "moveCompassBackground", 128, 10, 255, 137, 2)
check(WindowAddHotspot("shipNav", "North",
171, 10, 213, 53,
"", -- mouseover
"", -- cancelmouseover
"", -- mousedown
"", -- cancelmousedown
"mouseup", -- mouseup
"Hrm", -- hint text if they hover over it
0, 0))
--Small rectangle to show where the hotspot is while we get it working
WindowRectOp ("shipNav", 1, 171, 10, 213, 53, ColourNameToRGB("orange"))
WindowRectOp ("shipNav", 2, 0, 10, 122, 33, ColourNameToRGB("white"))
WindowRectOp ("shipNav", 2, 0, 36, 122, 59, ColourNameToRGB("white"))
WindowRectOp ("shipNav", 2, 0, 62, 122, 85, ColourNameToRGB("white"))
WindowRectOp ("shipNav", 2, 0, 88, 122, 111, ColourNameToRGB("white"))
WindowRectOp ("shipNav", 2, 0, 114, 122, 137, ColourNameToRGB("white"))
WindowDrawImage("shipNav", "windBackground", 100, 145, 255, 295, 2)
WindowRectOp ("shipNav", 2, 0, 145, 95, 190, ColourNameToRGB("purple"))
WindowRectOp ("shipNav", 2, 0, 200, 95, 245, ColourNameToRGB("purple"))
WindowRectOp ("shipNav", 2, 0, 255, 95, 295, ColourNameToRGB("purple"))
WindowShow("shipNav", true)
nav.win = true
end
The rest of the plugin has to do with the another miniwindow ("shipMap"), based of the mapping example Larkin posted elsewhere in the forum. The WindowRectOp() calls are just placeholders for parts I haven't implemented yet.
As for whats not working - tooltip isn't showing up, and the mouseup callback isn't been called. I tried to make a mouseover function, to test if it was picking up the moust moving into the area, but not getting anything from that, either
|