Added support for the MouseWheelScrolled event

This commit is contained in:
Zachariah Brown committed 2015-05-01 15:20:45 -04:00
1 parent 1486a30e2f
commit a424e91a54
3 files changed
+36 -4

No files matched your search

+8 -1
View File
@@ -33,7 +33,7 @@
////////////////////////////////////////////////////////////
// Define a function to convert a sf::Event ot a sfEvent
// Define a function to convert a sf::Event to a sfEvent
////////////////////////////////////////////////////////////
inline void convertEvent(const sf::Event& SFMLEvent, sfEvent* event)
{
@@ -67,6 +67,13 @@ inline void convertEvent(const sf::Event& SFMLEvent, sfEvent* event)
event->mouseWheel.y = SFMLEvent.mouseWheel.y;
break;
case sfEvtMouseWheelScrolled :
event->mouseWheelScroll.wheel = static_cast<sfMouseWheel>(SFMLEvent.mouseWheelScroll.wheel);
event->mouseWheelScroll.delta = SFMLEvent.mouseWheelScroll.delta;
event->mouseWheelScroll.x = SFMLEvent.mouseWheelScroll.x;
event->mouseWheelScroll.y = SFMLEvent.mouseWheelScroll.y;
break;
case sfEvtMouseButtonPressed :
case sfEvtMouseButtonReleased :
event->mouseButton.button = static_cast<sfMouseButton>(SFMLEvent.mouseButton.button);