Esempio n. 1
0
  public void update(GameContainer gc, StateBasedGame game, int delta) throws SlickException {
    resetSelectionBooleans();

    int x = input.getMouseX(), y = input.getMouseY();
    backgroundX = -419 * x / 528 - 1365;
    backgroundY = -533 * y / 300 - 1365;

    if (x > 455 && x < 600 && y > 260 && y < 300) hovering[0] = true;
    else if (x > 380 && x < 675 && y > 320 && y < 360) hovering[1] = true;
    else if (x > 455 && x < 600 && y > 380 && y < 420) hovering[2] = true;
  }
Esempio n. 2
0
 public void init(GameContainer gc, StateBasedGame game) throws SlickException {
   input = new Input(600);
   input.addListener(this);
 }