Allow mouse scroll wheel events to be used in hotspots, so that you can use the scrollup/scrolldown to navigate a miniwindow.
Thanks,
Bast
Thanks,
Bast
This forum is a read-only archive of the Gammon Software forum (2000–2026). No new posts can be made. Search the archive.
Posted by Bast on Tue 15 Jun 2010 07:14 PM — 11 posts, 39,437 views.
if (Mouse_Wheel_MiniWindow (pDoc, point, zDelta < 0 ? -1 : 1))
return 1;
function OnScroll(...)
tprint{...}
end
WindowCreate("foo", 0, 0, 50, 50, 12, 0, 0xFFFFFF)
WindowShow("foo")
WindowAddHotspot("foo", "foo-h1", 0, 0, 49, 49, "", "", "", "", "", "", 0, 0);
WindowScrollwheelHandler("foo", "foo-h1", "OnScroll")function OnScroll(direction, hotspod_id)
-- ...
end
function wheel_move (flags, hotspot_id)
if bit.band (flags, 0x100) ~= 0 then
-- wheel scrolled down (towards you)
else
-- wheel scrolled up (away from you)
end -- if
return 0 -- needed for some languages
end -- drag_move