diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-19 21:45:41 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-19 21:45:41 +0200 |
commit | 1a79137e904eb07c17df2596e6b8aa9310ff22bd (patch) | |
tree | 8f43f58dc8fce59875d9829d1c15b26e1a519be2 /src/ui/list.cpp | |
parent | 10c9d92cd2581448d76548efb20957a7a1c24478 (diff) | |
download | colobot-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.cpp | 4 |
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(); |