• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


Commit MetaInfo

Revision2209602d32632e4c193e321230b3f672ad2db600 (tree)
Time2003-10-27 02:56:36
Authormojomonkey <mojomonkey@75d0...>
Commitermojomonkey

Log Message

add button press checks.

git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@114 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

Change Summary

Incremental Difference

--- a/src/com/jme/input/LWJGLMouseInput.java
+++ b/src/com/jme/input/LWJGLMouseInput.java
@@ -41,7 +41,7 @@ import com.jme.util.LoggingSystem;
4141 * <code>LWJGLMouseInput</code> handles mouse input via the LWJGL Input API.
4242 *
4343 * @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 $
4545 */
4646 public class LWJGLMouseInput implements MouseInput {
4747
@@ -82,6 +82,14 @@ public class LWJGLMouseInput implements MouseInput {
8282 public String getButtonName(int buttonIndex) {
8383 return Mouse.getButtonName(buttonIndex);
8484 }
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+ }
8593
8694 /**
8795 * <code>isCreated</code> returns false if the mouse is created, false
--- a/src/com/jme/input/MouseInput.java
+++ b/src/com/jme/input/MouseInput.java
@@ -35,7 +35,7 @@ package com.jme.input;
3535 * <code>MouseInput</code> defines an interface to communicate with the mouse
3636 * input device.
3737 * @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 $
3939 */
4040 public interface MouseInput {
4141
@@ -57,6 +57,15 @@ public interface MouseInput {
5757
5858 /**
5959 *
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+ *
6069 * <code>getButtonName</code> gets the button name for a given button
6170 * code.
6271 * @param buttonIndex the code to get the name for.