I support mouse gestures on this texture, and I get those mouse gestures as a stream of (bool, int, int) structs for whether the trigger is pressed and the pixel values. Using SendMouseClickEvent, I can get clicking behavior to work, I also can get the mouse to hover.
However, for sliders, and other things which require the mouse to be depressed while pulling them, the best I can do is click the position. i can't get the mouse to click, hold and drag the slider around.
My implementation of the menu supports animations and is doing 30fps, so I would like to be able to be able to get the full extent of Left mouse button functionality if possible.
I haven't seen much on this, so any help is appreciated.
Here's the current implementation. m_iMouseState is used as a bool. Note that this example uses the CefSharp library, but the forwarding from Cefsharp to CEF is pretty simple, so it ought to translate directly to the typical CefBrowserHost::SendMouseMove type code.
- Code: Select all
if(mode == m_iPrevMouseState && m_iMouseState == 1)
{
_browser.GetBrowserHost().SendMouseMoveEvent(x, y, false, CefEventFlags.LeftMouseButton);
}
else
{
_browser.GetBrowserHost().SendMouseClickEvent(x, y, MouseButtonType.Left, !(m_iMouseState > 0), 1, CefEventFlags.None);
}