Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Message
| OK fixed that. The corrected version is in the same place except change "beta" to "beta2".
My test code btw is:
win = "test_" .. GetPluginID () -- get a unique name, ensure not empty if outside plugin
WindowCreate (win, 0, 0, 400, 400, miniwin.pos_center_all, 0, ColourNameToRGB("white")) -- create window
WindowShow (win, true) -- show it
-- Grid
for i = 1, math.max (WindowInfo (win, 3), WindowInfo (win, 4)) / 20 do
WindowLine (win, i * 20, 0, i * 20, WindowInfo (win, 4), 0xC0C0C0, miniwin.pen_solid, 1)
WindowLine (win, 0, i * 20, WindowInfo (win, 3), i * 20, 0xC0C0C0, miniwin.pen_solid, 1)
end -- for
function showhotspot ()
ColourNote ("gray", "", " Current hotspot over = " .. WindowInfo (win, 19))
ColourNote ("gray", "", " Current hotspot down = " .. WindowInfo (win, 20))
end -- showhotspot
function mouseover (flags, hotspot_id)
Note ("we moused over hotspot " .. hotspot_id)
showhotspot ();
end -- mouseover
function cancelmouseover (flags, hotspot_id)
Note ("we cancelled mouseover hotspot " .. hotspot_id)
showhotspot ();
end -- cancelmouseover
function mousedown (flags, hotspot_id)
Note ("we moused down over hotspot " .. hotspot_id)
showhotspot ();
end -- mousedown
function cancelmousedown (flags, hotspot_id)
Note ("we cancelled mouse down over hotspot " .. hotspot_id)
showhotspot ();
end -- cancelmousedown
function mouseup (flags, hotspot_id)
Note ("we moused up over hotspot " .. hotspot_id)
showhotspot ();
end -- mouseup
WindowAddHotspot(win, "hs1",
10, 10, 60, 80, -- rectangle
"mouseover",
"cancelmouseover",
"mousedown",
"cancelmousedown",
"mouseup",
"Hot Spot 1", -- tooltip text
miniwin.cursor_hand, 0) -- hand cursor
WindowRectOp ( win, miniwin.rect_frame, 10, 10, 60, 80, ColourNameToRGB ("red"), 0)
WindowAddHotspot(win, "hs2",
50, 10, 160, 100, -- rectangle
"mouseover",
"cancelmouseover",
"mousedown",
"cancelmousedown",
"mouseup",
"Hot Spot 2", -- tooltip text
miniwin.cursor_hand, 0) -- hand cursor
WindowRectOp ( win, miniwin.rect_frame, 50, 10, 160, 100, ColourNameToRGB ("blue"), 0)
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|