示例#1
0
  private void drawButtons(float x, float y) {

    for (int i = 0; i < options.length; i++) {
      if (selectedIndex == i) {
        drawButton(x, y + (i * 40), 5);
      } else {
        drawClickedButton(x, y + (i * 40), 5);
      }
      Font.render(
          (int) 400 - (8 * Game.LANGUAGE.getString(options[i]).length()),
          (int) y + 7 + (i * 40),
          Game.LANGUAGE.getString(options[i]));
    }
  }
示例#2
0
 public void render() {
   background.draw(0, 0);
   drawButton(Game.SCREEN_WIDTH / 2 - 20 * 8, 50, 7);
   Font.render(Game.SCREEN_WIDTH / 2 - 9 * 8, 58, "Game Over");
   drawButtons(Game.SCREEN_WIDTH / 2 - 120, 250);
 }