// Path: src/com/bitwaffle/spaceguts/input/MouseManager.java
// public class MouseManager {
// 	/** whether or not button a is being pressed */
// 	public static boolean button0, button1, button2;
// 
// 	/** how much the mouse has moved on the X axis */
// 	public static float dx;
// 	/** how much the mouse has move on the Y axis */
// 	public static float dy;
// 	/** how much the mouse wheel has moved */
// 	public static float wheel;
// 	/** the mouse's current location */
// 	public static int x, y;
// 
// 	public static boolean inverted = false;
// 
// 	/**
// 	 * sensitivity values for mouse movement
// 	 * NOTE:The mouse movement is divided by these 
// 	 * So setting them to 10 would result in 1/10th of the mouse movement 
// 	 * (higher numbers == less sensitivity)
// 	 */
// 	public static float verticalSensitivity = 10.0f;
// 	public static float horizontalSensitivity = 10.0f;
// 
// 	public void update() {
// 		while (Mouse.next()) {
// 			String eventButton = Mouse.getButtonName(Mouse.getEventButton());
// 			if (eventButton != null) {
// 				if (Mouse.getEventButtonState()) {
// 					if (eventButton.equals("BUTTON0")) {
// 						button0 = true;
// 					}
// 					if (eventButton.equals("BUTTON1")) {
// 						button1 = true;
// 					}
// 					if (eventButton.equals("BUTTON2")) {
// 						button2 = true;
// 					}
// 				} else {
// 					if (eventButton.equals("BUTTON0")) {
// 						button0 = false;
// 					}
// 					if (eventButton.equals("BUTTON1")) {
// 						button1 = false;
// 					}
// 					if (eventButton.equals("BUTTON2")) {
// 						button2 = false;
// 					}
// 				}
// 			}
// 		}
// 
// 		// Only update dx and dy if the mouse is grabbed
// 		if (Mouse.isGrabbed()) {
// 			dx = (-(float) Mouse.getDX()) / verticalSensitivity;
// 			if(!inverted)
// 				dy = ((float) Mouse.getDY()) / horizontalSensitivity;
// 			else
// 				dy = -((float) Mouse.getDY()) / horizontalSensitivity;
// 		} else {
// 			dx = 0.0f;
// 			dy = 0.0f;
// 		}
// 
// 		// grab wheel change amount
// 		wheel = (float) Mouse.getDWheel();
// 
// 		x = Mouse.getX();
// 		// we want the top-left corner to be 0,0
// 		y = DisplayHelper.windowHeight - Mouse.getY();
// 	}
// 
// }


import org.lwjgl.util.Rectangle;
import com.bitwaffle.spaceguts.input.MouseManager;
				} else if (pressed && !released) {
					released = true;
				}

				if (!MouseManager.button0) {
					pressed = false;
				}
				// the button was pressed, then the mouse was moved off of it
				// but
				// the mouse button was held down
			} else if (pressed && MouseManager.button0) {
				pressed = true;
			} else {
				pressed = false;
			}

			if (released) {
				// take care of release event (changing something in-game)
				releasedEvent();
				released = false;
			}

			activeEvent();

			if (mouseOver) {
				mouseOverEvent();
				// take care of mouseover event (changing image)
			}

			if (pressed) {
// Path: src/com/bitwaffle/spaceguts/input/MouseManager.java
// public class MouseManager {
// 	/** whether or not button a is being pressed */
// 	public static boolean button0, button1, button2;
// 
// 	/** how much the mouse has moved on the X axis */
// 	public static float dx;
// 	/** how much the mouse has move on the Y axis */
// 	public static float dy;
// 	/** how much the mouse wheel has moved */
// 	public static float wheel;
// 	/** the mouse's current location */
// 	public static int x, y;
// 
// 	public static boolean inverted = false;
// 
// 	/**
// 	 * sensitivity values for mouse movement
// 	 * NOTE:The mouse movement is divided by these 
// 	 * So setting them to 10 would result in 1/10th of the mouse movement 
// 	 * (higher numbers == less sensitivity)
// 	 */
// 	public static float verticalSensitivity = 10.0f;
// 	public static float horizontalSensitivity = 10.0f;
// 
// 	public void update() {
// 		while (Mouse.next()) {
// 			String eventButton = Mouse.getButtonName(Mouse.getEventButton());
// 			if (eventButton != null) {
// 				if (Mouse.getEventButtonState()) {
// 					if (eventButton.equals("BUTTON0")) {
// 						button0 = true;
// 					}
// 					if (eventButton.equals("BUTTON1")) {
// 						button1 = true;
// 					}
// 					if (eventButton.equals("BUTTON2")) {
// 						button2 = true;
// 					}
// 				} else {
// 					if (eventButton.equals("BUTTON0")) {
// 						button0 = false;
// 					}
// 					if (eventButton.equals("BUTTON1")) {
// 						button1 = false;
// 					}
// 					if (eventButton.equals("BUTTON2")) {
// 						button2 = false;
// 					}
// 				}
// 			}
// 		}
// 
// 		// Only update dx and dy if the mouse is grabbed
// 		if (Mouse.isGrabbed()) {
// 			dx = (-(float) Mouse.getDX()) / verticalSensitivity;
// 			if(!inverted)
// 				dy = ((float) Mouse.getDY()) / horizontalSensitivity;
// 			else
// 				dy = -((float) Mouse.getDY()) / horizontalSensitivity;
// 		} else {
// 			dx = 0.0f;
// 			dy = 0.0f;
// 		}
// 
// 		// grab wheel change amount
// 		wheel = (float) Mouse.getDWheel();
// 
// 		x = Mouse.getX();
// 		// we want the top-left corner to be 0,0
// 		y = DisplayHelper.windowHeight - Mouse.getY();
// 	}
// 
// }


// Path: src/com/bitwaffle/spaceguts/graphics/gui/button/RectangleButton.java
import org.lwjgl.util.Rectangle;
import com.bitwaffle.spaceguts.input.MouseManager;

				} else if (pressed && !released) {
					released = true;
				}

				if (!MouseManager.button0) {
					pressed = false;
				}
				// the button was pressed, then the mouse was moved off of it
				// but
				// the mouse button was held down
			} else if (pressed && MouseManager.button0) {
				pressed = true;
			} else {
				pressed = false;
			}

			if (released) {
				// take care of release event (changing something in-game)
				releasedEvent();
				released = false;
			}

			activeEvent();

			if (mouseOver) {
				mouseOverEvent();
				// take care of mouseover event (changing image)
			}

			if (pressed) {
				pressedEvent();