summaryrefslogtreecommitdiffstats
path: root/src/ui/slider.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/slider.cpp
parent10c9d92cd2581448d76548efb20957a7a1c24478 (diff)
downloadcolobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.tar.gz
colobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.tar.bz2
colobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.zip
Mouse wheel fixes
Diffstat (limited to 'src/ui/slider.cpp')
-rw-r--r--src/ui/slider.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ui/slider.cpp b/src/ui/slider.cpp
index 185ee35..175a6fe 100644
--- a/src/ui/slider.cpp
+++ b/src/ui/slider.cpp
@@ -356,20 +356,20 @@ bool CSlider::EventProcess(const Event &event)
m_bCapture = false;
}
- if ( event.type == EVENT_KEY_DOWN &&
- event.mouseButton.button == 4 &&
- Detect(event.pos) &&
- m_buttonLeft != 0 )
+ if (event.type == EVENT_MOUSE_WHEEL &&
+ event.mouseWheel.dir == WHEEL_UP &&
+ Detect(event.mouseWheel.pos) &&
+ m_buttonLeft != 0)
{
Event newEvent = event;
newEvent.type = m_buttonLeft->GetEventType();
m_event->AddEvent(newEvent);
}
- if ( event.type == EVENT_KEY_DOWN &&
- event.mouseButton.button == 5 &&
- Detect(event.pos) &&
- m_buttonRight != 0 )
+ if (event.type == EVENT_MOUSE_WHEEL &&
+ event.mouseButton.button == WHEEL_DOWN &&
+ Detect(event.mouseWheel.pos) &&
+ m_buttonRight != 0)
{
Event newEvent = event;
newEvent.type = m_buttonRight->GetEventType();