git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix RealToFloat test (hopefully)
[ipdf/code.git]
/
src
/
screen.cpp
diff --git
a/src/screen.cpp
b/src/screen.cpp
index
d924c06
..
9ee15b4
100644
(file)
--- a/
src/screen.cpp
+++ b/
src/screen.cpp
@@
-58,6
+58,8
@@
bool Screen::PumpEvents()
}
break;
case SDL_MOUSEMOTION:
}
break;
case SDL_MOUSEMOTION:
+ m_last_mouse_x = evt.motion.x;
+ m_last_mouse_y = evt.motion.y;
if (m_mouse_handler)
{
m_mouse_handler(evt.motion.x, evt.motion.y,evt.motion.state, 0);
if (m_mouse_handler)
{
m_mouse_handler(evt.motion.x, evt.motion.y,evt.motion.state, 0);
@@
-65,11
+67,19
@@
bool Screen::PumpEvents()
break;
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP:
break;
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP:
+ m_last_mouse_x = evt.button.x;
+ m_last_mouse_y = evt.button.y;
if (m_mouse_handler)
{
m_mouse_handler(evt.button.x, evt.button.y, evt.button.state, 0);
}
break;
if (m_mouse_handler)
{
m_mouse_handler(evt.button.x, evt.button.y, evt.button.state, 0);
}
break;
+ case SDL_MOUSEWHEEL:
+ if (m_mouse_handler)
+ {
+ m_mouse_handler(m_last_mouse_x, m_last_mouse_y, 0, evt.wheel.y);
+ }
+ break;
default:
break;
}
default:
break;
}
UCC
git Repository :: git.ucc.asn.au