summaryrefslogtreecommitdiffstats
path: root/src/ui/scroll.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-09-19 21:45:41 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-09-19 21:45:41 +0200
commit1a79137e904eb07c17df2596e6b8aa9310ff22bd (patch)
tree8f43f58dc8fce59875d9829d1c15b26e1a519be2 /src/ui/scroll.cpp
parent10c9d92cd2581448d76548efb20957a7a1c24478 (diff)
downloadcolobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.tar.gz
colobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.tar.bz2
colobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.zip
Mouse wheel fixes
Diffstat (limited to 'src/ui/scroll.cpp')
-rw-r--r--src/ui/scroll.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ui/scroll.cpp b/src/ui/scroll.cpp
index 41240ca..38379a5 100644
--- a/src/ui/scroll.cpp
+++ b/src/ui/scroll.cpp
@@ -292,19 +292,19 @@ bool CScroll::EventProcess(const Event &event)
m_bCapture = false;
}
- if ( event.type == EVENT_KEY_DOWN &&
- event.mouseButton.button == 4 &&
- Detect(event.pos) &&
- m_buttonUp != 0 )
+ if (event.type == EVENT_MOUSE_WHEEL &&
+ event.mouseWheel.dir == WHEEL_UP &&
+ Detect(event.mouseWheel.pos) &&
+ m_buttonUp != 0)
{
Event newEvent = event;
newEvent.type = m_buttonUp->GetEventType();
m_event->AddEvent(newEvent);
}
- if ( event.type == EVENT_KEY_DOWN &&
- event.mouseButton.button == 5 &&
- Detect(event.pos) &&
- m_buttonDown != 0 )
+ if (event.type == EVENT_MOUSE_WHEEL &&
+ event.mouseWheel.dir == WHEEL_DOWN &&
+ Detect(event.mouseWheel.pos) &&
+ m_buttonDown != 0)
{
Event newEvent = event;
newEvent.type = m_buttonDown->GetEventType();