Esempio n. 1
0
  public void tick() {

    zordz.screen.setOff(0, 0);
    volume.setValue(Options.SOUND_LEVEL * 4);
    if (cancel.clicked()) {
      saveOptions();
      if (backToState == 0) {
        zordz.switchState(zordz.titlestate);
      } else if (backToState == 1) {
        zordz.switchState(zordz.gamestate);
      }
      SoundPlayer.play(Sound.button_clicked);
    } else if (volume.clicked()) {
      volume.setValue(Mouse.getX() - 100);
      Options.SOUND_LEVEL = Math.round(volume.value / 4);
    } else if (done.clicked()) {
      saveOptions();
      if (backToState == 0) {
        zordz.switchState(zordz.titlestate);
      } else if (backToState == 1) {
        zordz.switchState(zordz.gamestate);
      }
      SoundPlayer.play(Sound.button_clicked);
    }
    if (console.wasClicked) {
      zordz.console.setVisible(console.checked);
    }
  }