Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool CGUIWebBrowser_Impl::Event_MouseButtonDown(const CEGUI::EventArgs& e)
- {
- const CEGUI::MouseEventArgs& args = reinterpret_cast<const CEGUI::MouseEventArgs&>(e);
- if (args.button == CEGUI::MouseButton::LeftButton)
- {
- m_pWebView->ExecuteJavascript("console.log('CGUIWebBrowser_Impl::Event_MouseButtonDown BROWSER_MOUSEBUTTON_LEFT');");
- m_pWebView->InjectMouseDown(eWebBrowserMouseButton::BROWSER_MOUSEBUTTON_LEFT);
- }
- else if (args.button == CEGUI::MouseButton::MiddleButton)
- {
- m_pWebView->ExecuteJavascript("console.log('CGUIWebBrowser_Impl::Event_MouseButtonDown BROWSER_MOUSEBUTTON_MIDDLE');");
- m_pWebView->InjectMouseDown(eWebBrowserMouseButton::BROWSER_MOUSEBUTTON_MIDDLE);
- }
- else if (args.button == CEGUI::MouseButton::RightButton)
- {
- m_pWebView->ExecuteJavascript("console.log('CGUIWebBrowser_Impl::Event_MouseButtonDown BROWSER_MOUSEBUTTON_RIGHT');");
- m_pWebView->InjectMouseDown(eWebBrowserMouseButton::BROWSER_MOUSEBUTTON_RIGHT);
- }
- return true;
- }
- bool CGUIWebBrowser_Impl::Event_MouseButtonUp(const CEGUI::EventArgs& e)
- {
- const CEGUI::MouseEventArgs& args = reinterpret_cast<const CEGUI::MouseEventArgs&>(e);
- if (args.button == CEGUI::MouseButton::LeftButton)
- {
- m_pWebView->ExecuteJavascript("console.log('CGUIWebBrowser_Impl::Event_MouseButtonUp BROWSER_MOUSEBUTTON_LEFT');");
- m_pWebView->InjectMouseUp(eWebBrowserMouseButton::BROWSER_MOUSEBUTTON_LEFT);
- }
- else if (args.button == CEGUI::MouseButton::MiddleButton)
- {
- m_pWebView->ExecuteJavascript("console.log('CGUIWebBrowser_Impl::Event_MouseButtonUp BROWSER_MOUSEBUTTON_MIDDLE');");
- m_pWebView->InjectMouseUp(eWebBrowserMouseButton::BROWSER_MOUSEBUTTON_MIDDLE);
- }
- else if (args.button == CEGUI::MouseButton::RightButton)
- {
- m_pWebView->ExecuteJavascript("console.log('CGUIWebBrowser_Impl::Event_MouseButtonUp BROWSER_MOUSEBUTTON_RIGHT');");
- m_pWebView->InjectMouseUp(eWebBrowserMouseButton::BROWSER_MOUSEBUTTON_RIGHT);
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment