mirror of https://github.com/AxioDL/boo.git
Add horizonal mousewheel scrolling
This commit is contained in:
parent
6c5e8f5fe8
commit
056eef542b
|
@ -269,6 +269,7 @@ public:
|
||||||
case WM_MOUSEHOVER:
|
case WM_MOUSEHOVER:
|
||||||
case WM_NCMOUSEHOVER:
|
case WM_NCMOUSEHOVER:
|
||||||
case WM_MOUSEWHEEL:
|
case WM_MOUSEWHEEL:
|
||||||
|
case WM_MOUSEHWHEEL:
|
||||||
case WM_CHAR:
|
case WM_CHAR:
|
||||||
case WM_UNICHAR:
|
case WM_UNICHAR:
|
||||||
window->_incomingEvent(&HWNDEvent(uMsg, wParam, lParam));
|
window->_incomingEvent(&HWNDEvent(uMsg, wParam, lParam));
|
||||||
|
|
|
@ -1190,6 +1190,24 @@ public:
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
case WM_MOUSEHWHEEL:
|
||||||
|
{
|
||||||
|
if (m_callback)
|
||||||
|
{
|
||||||
|
int x, y, w, h;
|
||||||
|
getWindowFrame(x, y, w, h);
|
||||||
|
SWindowCoord coord =
|
||||||
|
{
|
||||||
|
{ GET_X_LPARAM(e.lParam), h-GET_Y_LPARAM(e.lParam) },
|
||||||
|
{ GET_X_LPARAM(e.lParam), h-GET_Y_LPARAM(e.lParam) },
|
||||||
|
{ float(GET_X_LPARAM(e.lParam)) / float(w), float(h-GET_Y_LPARAM(e.lParam)) / float(h) }
|
||||||
|
};
|
||||||
|
SScrollDelta scroll = {};
|
||||||
|
scroll.delta[0] = GET_WHEEL_DELTA_WPARAM(e.wParam) / double(-WHEEL_DELTA);
|
||||||
|
m_callback->scroll(coord, scroll);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
case WM_CHAR:
|
case WM_CHAR:
|
||||||
case WM_UNICHAR:
|
case WM_UNICHAR:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue