Path: blob/master/SLICK_HOME/src/org/newdawn/slick/command/MouseButtonControl.java
1456 views
package org.newdawn.slick.command;12/**3* A control indicating that a mouse button must be pressed or released to cause an command4*5* @author joverton6*/7public class MouseButtonControl implements Control {8/** The button to be pressed */9private int button;1011/**12* Create a new control that indicates a mouse button to be pressed or released13*14* @param button The button that should be pressed to cause the command15*/16public MouseButtonControl(int button) {17this.button = button;18}1920/**21* @see java.lang.Object#equals(java.lang.Object)22*/23public boolean equals(Object o) {24if (o instanceof MouseButtonControl)25{26return ((MouseButtonControl)o).button == button;27}2829return false;30}3132/**33* @see java.lang.Object#hashCode()34*/35public int hashCode() {36return button;37}38}394041