Skip to content

MAIN MENU AND SETTING MENU DISPLAY CHANGES

neil-nb edited this page Oct 19, 2023 · 9 revisions

Overview

The MainMenuDisplay and class is a UI component responsible for displaying the main menu of the game. It allows users to navigate and interact with various menu options. This documentation focuses on adding static images to run an animation the main menu.

Table of Contents

Added Visual effects

Methods

Animation

Dependencies

Contributors

The base of the main menu screen's background:

image

The base of the settings screen's background:

image

Added visual effects

In the MainMenuDisplay class, the background is initialized with the following code:

image

The buttons that are necessary for the main menu are initialized with the following code:

image

The buttons are given listeners to ensure that they work when pressed, and do not do anything when unpressed.

Settings Display

In the SettingsMenuDisplay class, images are added to enhance the visual appeal of the main menu as shown below:

Screenshot 2023-08-31 at 1 42 40 AM

Main Menu

image

Settings Menu

image

Methods

create() The create method is called during component creation and is responsible for setting up the main menu's UI elements, including the title image and menu buttons

Starry Background Explanation

The MainMenuDisplay class, imports a class called MainMenuStarBackground. This class is responsible for animating the main menu screen. It works via:

The creation of stars via the MainMenuStarBackground constructor, which involves:

Iterating through each of the star animation sprites via a for loop.

image

Setting the animation style of the stars, and the area of the screen they can take up.

image

The same is done for the settings menu background. The SettingsMenuDisplay class, imports a class called SettingsStarBackground. This class is responsible for animating the settings screen.

image

Dependencies

  • LibGDX: The core framework for developing cross-platform games.

Contributors

Clone this wiki locally