Skip to content

Commit 46ba894

Browse files
committed
Fixing commit of mouse input handler
1 parent d9c90f1 commit 46ba894

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

README.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
README for version 1.0.0 by Darrell Root
1+
README for version 0.9.6 Beta by Darrell Root
22

33
I've taken Robert Temple's old JTrek code from 1998 and am attempting to update
44
it to run on recent versions of Java. Most of the code is cut-and-pasted from
5-
Robert's source code. Long live Netrek! - Darrell [email protected]
5+
Robert's source code.
6+
7+
0.9.6 update: multi-button mouse works! But we have high cpu utilization and need profiling.
8+
9+
Long live Netrek! - Darrell [email protected]
610

711

812

@@ -215,4 +219,4 @@ Source code
215219
-----------------------------------------------------------------------
216220

217221
There is a link to the latest at:
218-
http://www.starwave.com/people/robertt/JTrek
222+
http://www.starwave.com/people/robertt/JTrek

src/jtrek/input/MouseInputHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ public MouseInputHandler(KeyInputHandler key_input) {
1212
}
1313

1414
/** mousePressed */
15-
public void mousePressed(MouseEvent e) {
16-
char key = 1;
15+
public void mousePressed(MouseEvent e) {
16+
//char key = 1;
17+
char key = (char) e.getButton(); // BUTTON1 == 1, BUTTON2 == 2, BUTTON3 == 3
1718
if(e.isAltDown()) {
1819
key = 2;
1920
}

0 commit comments

Comments
 (0)