Class GameMenuModel
java.lang.Object
fr.paris.saclay.sidescroller.controllers.components.menu.GameMenuModel
Model of GameMenu class, it stores its logic.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets avatar preview.Gets back button.Gets background preview.Gets background themes.Gets credits.intGets current player selection.intGets current theme selection.Gets next avatar button.Gets next background button.Gets play button.Gets player themes.Gets preferred size.Gets previous avatar button.Gets previous background button.Gets quit button.Gets quit to menu button.Gets resume button.getSize()Gets size.Gets start game button.getTimer()Gets timer.booleanIs pause menu boolean.voidsetBackButton(MenuButton backButton) Sets back button.voidsetCredits(JLabel credits) Sets credits.voidsetCurrentPlayerSelection(int currentPlayerSelection) Sets current player selection.voidsetCurrentThemeSelection(int currentThemeSelection) Sets current theme selection.voidsetNextAvatarButton(SelectionMenuButton nextAvatarButton) Sets next avatar button.voidsetNextBackgroundButton(SelectionMenuButton nextBackgroundButton) Sets next background button.voidsetPauseMenu(boolean pauseMenu) Sets pause menu.voidsetPlayButton(MenuButton playButton) Sets play button.voidsetPreviousAvatarButton(SelectionMenuButton previousAvatarButton) Sets previous avatar button.voidsetPreviousBackgroundButton(SelectionMenuButton previousBackgroundButton) Sets previous background button.voidsetQuitButton(MenuButton quitButton) Sets quit button.voidsetQuitToMenuButton(MenuButton quitToMenuButton) Sets quit to menu button.voidsetResumeButton(MenuButton resumeButton) Sets resume button.voidsetStartGameButton(MenuButton startGameButton) Sets start game button.voidSets timer.
-
Constructor Details
-
GameMenuModel
public GameMenuModel()
-
-
Method Details
-
getPreferredSize
Gets preferred size.- Returns:
- the preferred size
-
getSize
Gets size.- Returns:
- the size
-
isPauseMenu
public boolean isPauseMenu()Is pause menu boolean.- Returns:
- the boolean
-
setPauseMenu
public void setPauseMenu(boolean pauseMenu) Sets pause menu.- Parameters:
pauseMenu- the pause menu
-
getPlayButton
Gets play button.- Returns:
- the play button
-
getQuitButton
Gets quit button.- Returns:
- the quit button
-
getResumeButton
Gets resume button.- Returns:
- the resume button
-
getQuitToMenuButton
Gets quit to menu button.- Returns:
- the quit to menu button
-
getCredits
Gets credits.- Returns:
- the credits
-
setCredits
Sets credits.- Parameters:
credits- the credits
-
getTimer
Gets timer.- Returns:
- the timer
-
setTimer
Sets timer.- Parameters:
timer- the timer
-
getBackgroundThemes
Gets background themes.- Returns:
- the background themes
-
getPlayerThemes
Gets player themes.- Returns:
- the player themes
-
getCurrentThemeSelection
public int getCurrentThemeSelection()Gets current theme selection.- Returns:
- the current theme selection
-
setCurrentThemeSelection
public void setCurrentThemeSelection(int currentThemeSelection) Sets current theme selection.- Parameters:
currentThemeSelection- the current theme selection
-
getCurrentPlayerSelection
public int getCurrentPlayerSelection()Gets current player selection.- Returns:
- the current player selection
-
setCurrentPlayerSelection
public void setCurrentPlayerSelection(int currentPlayerSelection) Sets current player selection.- Parameters:
currentPlayerSelection- the current player selection
-
getNextBackgroundButton
Gets next background button.- Returns:
- the next background button
-
getPreviousBackgroundButton
Gets previous background button.- Returns:
- the previous background button
-
getNextAvatarButton
Gets next avatar button.- Returns:
- the next avatar button
-
getPreviousAvatarButton
Gets previous avatar button.- Returns:
- the previous avatar button
-
getBackgroundPreview
Gets background preview.- Returns:
- the background preview
-
getAvatarPreview
Gets avatar preview.- Returns:
- the avatar preview
-
getStartGameButton
Gets start game button.- Returns:
- the start game button
-
getBackButton
Gets back button.- Returns:
- the back button
-