Basically here's the problem:
I need a plugin to get_a_world, draw a miniwindow and add a hotspot in the new window.
I can get the plugin to open the window and draw a miniwindow in it, however the hotspot callbacks are never called.
local mapget = get_a_world("MapGet", "Aardwolf")
if mapget then
win = GetPluginID()
local w_width = mapget.GetInfo(264)
local w_height = mapget.GetInfo(263)
Note(w_width)
Note(w_height)
mapget:WindowCreate(win, 0, 0, w_width, w_height, 0, 0, ColourNameToRGB("white"))
mapget:WindowLoadImage(win, "im", location)
mapget:WindowDrawImage(win, "im", 0,0,w_width,w_height, 2,0,0,0,0)
mapget:WindowAddHotspot(win, "hs1", 0, 0, w_width,w_height, "", "", "", "", "mouseup",
"Zoom", 10, 0)
mapget:WindowShow(win, True)
I tried installing a helper plugin in the new world window which would handle the drawing and adding a hotspot, the idea being perhaps the hotspot callback function was out of scope. But doing it that way, I can't get the main plugin in the main window to communicate with the helper plugin in the other world.
What to do???? |