summaryrefslogtreecommitdiffstats
path: root/src/jake2/sys/KBD.java
diff options
context:
space:
mode:
authorHolger Zickner <[email protected]>2004-11-03 08:53:27 +0000
committerHolger Zickner <[email protected]>2004-11-03 08:53:27 +0000
commit5634134db18049e3d44e0aa4cda7b871a4ea7a40 (patch)
tree864b37646674cdb59884a26bfe6a5abdac056f34 /src/jake2/sys/KBD.java
parent24284e5926af9dd90414ac57fe7c764128ffe13c (diff)
mouse wheel support
Diffstat (limited to 'src/jake2/sys/KBD.java')
-rw-r--r--src/jake2/sys/KBD.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/jake2/sys/KBD.java b/src/jake2/sys/KBD.java
index ab9d062..b88e2e3 100644
--- a/src/jake2/sys/KBD.java
+++ b/src/jake2/sys/KBD.java
@@ -2,7 +2,7 @@
* KBD.java
* Copyright (C) 2004
*
- * $Id: KBD.java,v 1.3 2004-10-31 13:56:17 cawe Exp $
+ * $Id: KBD.java,v 1.4 2004-11-03 08:53:27 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -101,6 +101,17 @@ public final class KBD {
Do_Key_Event(Key.K_MOUSE1 + b, false);
break;
+ case Jake2InputEvent.WheelMoved:
+ int dir = ((MouseWheelEvent)event.ev).getWheelRotation();
+ if (dir > 0) {
+ Do_Key_Event(Key.K_MWHEELDOWN, true);
+ Do_Key_Event(Key.K_MWHEELDOWN, false);
+ } else {
+ Do_Key_Event(Key.K_MWHEELUP, true);
+ Do_Key_Event(Key.K_MWHEELUP, false);
+ }
+ break;
+
case Jake2InputEvent.CreateNotify :
case Jake2InputEvent.ConfigureNotify :
Component c = ((ComponentEvent)event.ev).getComponent();