Main repository of MikuMikuStudio
Revision | 2209602d32632e4c193e321230b3f672ad2db600 (tree) |
---|---|
Time | 2003-10-27 02:56:36 |
Author | mojomonkey <mojomonkey@75d0...> |
Commiter | mojomonkey |
add button press checks.
git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@114 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
@@ -41,7 +41,7 @@ import com.jme.util.LoggingSystem; | ||
41 | 41 | * <code>LWJGLMouseInput</code> handles mouse input via the LWJGL Input API. |
42 | 42 | * |
43 | 43 | * @author Mark Powell |
44 | - * @version $Id: LWJGLMouseInput.java,v 1.1 2003-10-23 21:24:18 mojomonkey Exp $ | |
44 | + * @version $Id: LWJGLMouseInput.java,v 1.2 2003-10-26 17:56:36 mojomonkey Exp $ | |
45 | 45 | */ |
46 | 46 | public class LWJGLMouseInput implements MouseInput { |
47 | 47 |
@@ -82,6 +82,14 @@ public class LWJGLMouseInput implements MouseInput { | ||
82 | 82 | public String getButtonName(int buttonIndex) { |
83 | 83 | return Mouse.getButtonName(buttonIndex); |
84 | 84 | } |
85 | + | |
86 | + /** | |
87 | + * <code>isButtonDown</code> tests if a given button is pressed or not. | |
88 | + * @see com.jme.input.MouseInput#isButtonDown(int) | |
89 | + */ | |
90 | + public boolean isButtonDown(int buttonCode) { | |
91 | + return Mouse.isButtonDown(buttonCode); | |
92 | + } | |
85 | 93 | |
86 | 94 | /** |
87 | 95 | * <code>isCreated</code> returns false if the mouse is created, false |
@@ -35,7 +35,7 @@ package com.jme.input; | ||
35 | 35 | * <code>MouseInput</code> defines an interface to communicate with the mouse |
36 | 36 | * input device. |
37 | 37 | * @author Mark Powell |
38 | - * @version $Id: MouseInput.java,v 1.2 2003-10-23 21:24:18 mojomonkey Exp $ | |
38 | + * @version $Id: MouseInput.java,v 1.3 2003-10-26 17:56:36 mojomonkey Exp $ | |
39 | 39 | */ |
40 | 40 | public interface MouseInput { |
41 | 41 |
@@ -57,6 +57,15 @@ public interface MouseInput { | ||
57 | 57 | |
58 | 58 | /** |
59 | 59 | * |
60 | + * <code>isButtonDown</code> returns true if a given button is pressed, | |
61 | + * false if it is not pressed. | |
62 | + * @param buttonCode the button code to check. | |
63 | + * @return true if the button is pressed, false otherwise. | |
64 | + */ | |
65 | + public boolean isButtonDown(int buttonCode); | |
66 | + | |
67 | + /** | |
68 | + * | |
60 | 69 | * <code>getButtonName</code> gets the button name for a given button |
61 | 70 | * code. |
62 | 71 | * @param buttonIndex the code to get the name for. |