Wiigee is now capable of detecting multiple button presses / releases at once. This was a user's wish for the next release.
git-svn-id: svn://svn.code.sf.net/p/wiigee/code/trunk@101 c7eff9ee-dd40-0410-8832-91a4d88773cf
This commit is contained in:
@@ -205,8 +205,8 @@ public class Device {
|
||||
|
||||
/** Fires a button released event.
|
||||
*/
|
||||
public void fireButtonReleasedEvent() {
|
||||
ButtonReleasedEvent w = new ButtonReleasedEvent(this);
|
||||
public void fireButtonReleasedEvent(int button) {
|
||||
ButtonReleasedEvent w = new ButtonReleasedEvent(this, button);
|
||||
for (int i = 0; i < this.buttonlistener.size(); i++) {
|
||||
this.buttonlistener.get(i).buttonReleaseReceived(w);
|
||||
}
|
||||
|
||||
@@ -33,25 +33,6 @@ import org.wiigee.device.*;
|
||||
* representation of which button has been pressed. Please note that
|
||||
* there exist enumeration constants in the class, so you don't
|
||||
* have to use this integer values directly.
|
||||
*
|
||||
* Button 1 matches button "2" on wiimote
|
||||
* Button 2 matches button "1" on wiimote
|
||||
* Button 3 matches button "B" on wiimote
|
||||
* Button 4 matches button "A" on wiimote
|
||||
* Button 5 matches button "MINUS" on wiimote
|
||||
* Button 6 unknown
|
||||
* Button 7 unknown
|
||||
* Button 8 matches button "HOME" on wiimote
|
||||
* Button 9 matches "CROSS LEFT" on wiimote
|
||||
* Button 10 matches "CROSS RIGHT" on wiimote
|
||||
* Button 11 matches "CROSS DOWN" on wiimote
|
||||
* Button 12 matches "CROSS UP" on wiimote
|
||||
* Button 13 matches button "PLUS" on wiimote
|
||||
* Button 14 unknown
|
||||
* Button 15 unknown
|
||||
* Button 16 unknown
|
||||
*
|
||||
* There can be other interpretations of buttons for other devices.
|
||||
*
|
||||
* @author Benjamin 'BePo' Poppinga
|
||||
*/
|
||||
|
||||
@@ -35,9 +35,15 @@ import org.wiigee.device.*;
|
||||
*/
|
||||
public class ButtonReleasedEvent extends ActionStopEvent {
|
||||
|
||||
public ButtonReleasedEvent(Device source) {
|
||||
int button;
|
||||
|
||||
public ButtonReleasedEvent(Device source, int button) {
|
||||
super(source);
|
||||
this.button = button;
|
||||
}
|
||||
|
||||
|
||||
public int getButton() {
|
||||
return this.button;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user