예제 #1
0
  public HUDTutorial(HUDManager hm, Registry rg, int x, int y, int w, int h) {
    super(hm, rg, x, y, w, h);

    setImage("HUD/Tutorial/1");

    HUDArea hudArea = null;

    // next
    hudArea = addArea(NEXT_X, NEXT_Y, NEXT_WIDTH, NEXT_HEIGHT, "next");
    hudArea.setImage("HUD/Tutorial/ButtonNext");

    // finish
    hudArea = addArea(FINISH_X, FINISH_Y, FINISH_WIDTH, FINISH_HEIGHT, "finish");
    hudArea.setImage("HUD/Tutorial/ButtonFinish");
    hudArea.setIsActive(false);

    // main_menu
    hudArea = addArea(MAIN_MENU_X, MAIN_MENU_Y, MAIN_MENU_WIDTH, MAIN_MENU_HEIGHT, "main_menu");
    hudArea.setImage("HUD/Tutorial/ButtonMainMenu");

    // exit
    hudArea = addArea(EXIT_X, EXIT_Y, EXIT_WIDTH, EXIT_HEIGHT, "exit");
    hudArea.setImage("HUD/Tutorial/ButtonExit");
  }
예제 #2
0
  public HUDScreenMain(HUDManager hm, Registry rg, int x, int y, int w, int h) {
    super(hm, rg, x, y, w, h);

    setImage("HUD/ScreenMain/BG");

    HUDArea hudArea = null;

    // single player
    hudArea =
        addArea(
            BUTTON_SINGLE_PLAYER_X,
            BUTTON_SINGLE_PLAYER_Y,
            BUTTON_LARGE_WIDTH,
            BUTTON_LARGE_HEIGHT,
            "single_player");
    hudArea.setImage("HUD/ScreenMain/ButtonSinglePlayer");

    // multi player
    hudArea =
        addArea(
            BUTTON_MULTI_PLAYER_X,
            BUTTON_MULTI_PLAYER_Y,
            BUTTON_LARGE_WIDTH,
            BUTTON_LARGE_HEIGHT,
            "multi_player");
    if (hudManager.getIsOnline() && Game.VERSION.equals(hudManager.getCurrentVersion())) {
      hudArea.setImage("HUD/ScreenMain/ButtonMultiPlayer");
    } else {
      hudArea.setImage("HUD/ScreenMain/ButtonMultiPlayerOff");
    }

    // settings
    hudArea =
        addArea(BUTTON_SETTINGS_X, BUTTON_SETTINGS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, "settings");
    hudArea.setImage("HUD/ScreenMain/ButtonSettings");

    // credits
    // hudArea = addArea(BUTTON_CREDITS_X, BUTTON_CREDITS_Y, BUTTON_WIDTH, BUTTON_HEIGHT,
    // "credits");
    // hudArea.setImage("HUD/ScreenMain/ButtonCredits");

    // exit
    hudArea = addArea(BUTTON_EXIT_X, BUTTON_EXIT_Y, BUTTON_WIDTH, BUTTON_HEIGHT, "exit");
    hudArea.setImage("HUD/ScreenMain/ButtonExit");

    // donate
    hudArea =
        addArea(
            BUTTON_DONATE_X, BUTTON_DONATE_Y, BUTTON_DONATE_WIDTH, BUTTON_DONATE_HEIGHT, "donate");
    hudArea.setImage("HUD/Common/Donate");

    // help
    // hudArea = addArea(BUTTON_HELP_X, BUTTON_HELP_Y, BUTTON_HELP_WIDTH, BUTTON_HELP_HEIGHT,
    // "help");
    // hudArea.setImage("HUD/Common/Help");

    if (hudManager.getIsOnline() && !Game.VERSION.equals(hudManager.getCurrentVersion())) {
      // download
      hudArea =
          addArea(
              BUTTON_DOWNLOAD_X,
              BUTTON_DOWNLOAD_Y,
              BUTTON_DOWNLOAD_WIDTH,
              BUTTON_DOWNLOAD_HEIGHT,
              "download");
      hudArea.setImage("HUD/ScreenMain/NewVersion");
    }

    hudManager.setStartServer(false);
    hudManager.setServerJoin(false);
  }