示例#1
0
  public MainMenuScreen(Game game) {
    super(game);
    Log.i("MainMenuScreen", "Starting Main Menu Screen...");
    Graphics g = game.getGraphics();
    this.mainMenuSplash =
        g.newImage("SplashScreenhighresfilled.png", Graphics.ImageFormat.ARGB8888);
    this.sound_enabled_img =
        g.newImage("UI-SettingsEnabledWindowhighres.png", Graphics.ImageFormat.ARGB8888);
    this.sound_disabled_img =
        g.newImage("UI-SettingsDisabledWindowhighres.png", Graphics.ImageFormat.ARGB8888);
    // Music menu_music = game.getAudio().newMusic("Boxing Bell Start Round.wav");
    // menu_music.play();
    // menu_music.setLooping(true);

  }
示例#2
0
  @Override
  public void paint(float deltaTime) {
    Graphics g = game.getGraphics();
    g.clearScreen(Color.WHITE);

    g.drawImage(this.mainMenuSplash, 0, 0);

    // Draw Settings window if appropriate
    if (at_settings) {
      int SETTINGS_WINDOW_X_POSITION = 50;
      int SETTINGS_WINDOW_Y_POSITION = 388;
      if (Settings.soundEnabled) {
        g.drawImage(this.sound_enabled_img, SETTINGS_WINDOW_X_POSITION, SETTINGS_WINDOW_Y_POSITION);
      } else if (!Settings.soundEnabled) {
        g.drawImage(
            this.sound_disabled_img, SETTINGS_WINDOW_X_POSITION, SETTINGS_WINDOW_Y_POSITION);
      }
    }
  }