summaryrefslogtreecommitdiffstats
path: root/src/ui/edit.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/edit.cpp
parent10c9d92cd2581448d76548efb20957a7a1c24478 (diff)
downloadcolobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.tar.gz
colobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.tar.bz2
colobot-1a79137e904eb07c17df2596e6b8aa9310ff22bd.zip
Mouse wheel fixes
Diffstat (limited to 'src/ui/edit.cpp')
-rw-r--r--src/ui/edit.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp
index 123f985..6323885 100644
--- a/src/ui/edit.cpp
+++ b/src/ui/edit.cpp
@@ -238,16 +238,16 @@ bool CEdit::EventProcess(const Event &event)
if ( (m_state & STATE_VISIBLE) == 0 ) return true;
- if ( event.type == EVENT_KEY_DOWN &&
- event.mouseButton.button == 5 &&
+ if (event.type == EVENT_MOUSE_WHEEL &&
+ event.mouseWheel.dir == WHEEL_UP &&
Detect(event.pos) )
{
Scroll(m_lineFirst-3, true);
return true;
}
- if ( event.type == EVENT_KEY_DOWN &&
- event.mouseButton.button == 4 && // TODO
- Detect(event.pos) )
+ if (event.type == EVENT_KEY_DOWN &&
+ event.mouseWheel.dir == WHEEL_DOWN &&
+ Detect(event.mouseWheel.pos) )
{
Scroll(m_lineFirst+3, true);
return true;