summaryrefslogtreecommitdiffstats
path: root/src/ui/list.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/list.cpp
parent10c9d92cd2581448d76548efb20957a7a1c24478 (diff)
downloadcolobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.tar.gz
colobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.tar.bz2
colobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.zip
Mouse wheel fixes
Diffstat (limited to 'src/ui/list.cpp')
-rw-r--r--src/ui/list.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/list.cpp b/src/ui/list.cpp
index 4e6ca38..06eaf37 100644
--- a/src/ui/list.cpp
+++ b/src/ui/list.cpp
@@ -257,7 +257,7 @@ bool CList::EventProcess(const Event &event)
if ((m_state & STATE_ENABLE) == 0)
return true;
- if (event.type == EVENT_KEY_DOWN && event.mouseButton.button == 5 && Detect(event.pos)) {
+ if (event.type == EVENT_MOUSE_WHEEL && event.mouseWheel.dir == WHEEL_UP && Detect(event.mouseWheel.pos)) {
if (m_firstLine > 0)
m_firstLine--;
UpdateScroll();
@@ -265,7 +265,7 @@ bool CList::EventProcess(const Event &event)
return true;
}
- if (event.type == EVENT_KEY_DOWN && event.mouseButton.button == 4 && Detect(event.pos)) {
+ if (event.type == EVENT_MOUSE_WHEEL && event.mouseWheel.dir == WHEEL_DOWN && Detect(event.mouseWheel.pos)) {
if (m_firstLine < m_totalLine - m_displayLine)
m_firstLine++;
UpdateScroll();