Package view
Class Gui
java.lang.Object
view.Gui
public class Gui
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description Gui()Constructorclass that creates the startscreen that the user is faced with. -
Method Summary
Modifier and Type Method Description voidaboutButton(java.awt.event.ActionListener action)voidbuildAboutUsScreen()Builds the screen that is shown when the player wants to read "about us".voidbuildHighscoreScreen(java.util.ArrayList highscoreList)voidbuildLoserScreen()builds the screen that is shown when the user fails a level.voidbuildPauseScreen()Builds the screen that is shown wile the game is in pausemode.voidbuildPlayScreen()Builds the full screen that is shown wile the user is playing the game.voidbuildVictoryScreen()Builds the screen that is shown when the user finishes a level.voidbuyPlainButton(java.awt.event.ActionListener action)voidbuySoldierButton(java.awt.event.ActionListener action)voiddrawNextFrame(java.awt.image.BufferedImage nextFrameImage)Changes the image in the middle panel when the user is in playmode to make it look like the troops are moving etc.voidenabledTroopButtons(java.lang.Boolean b)voidenableEnterTPButton(java.lang.Boolean b)voidenableExitTPButton(java.lang.Boolean b)voidenablePlaneButton(java.lang.Boolean b)voidenableSoldierButton(java.lang.Boolean b)voidexitButton(java.awt.event.ActionListener action)java.lang.StringgetName()intgetPanelHeight()intgetPanelWidth()voidhelpButton(java.awt.event.ActionListener action)voidhighscoreButton(java.awt.event.ActionListener action)voidnewGameResumeNextLevelButton(java.awt.event.ActionListener action)voidpauseButton(java.awt.event.ActionListener action)voidplaceEnterTPButton(java.awt.event.ActionListener action)voidplaceExitTPButton(java.awt.event.ActionListener action)voidrestartLevelButton(java.awt.event.ActionListener action)voidsetMouseListener(java.awt.event.MouseListener mouse)voidshow()Sets the gui visiblevoidshowPauseButton(java.lang.Boolean b)voidstraightAhead(java.awt.event.ActionListener action)voidturnLeft(java.awt.event.ActionListener action)voidturnRight(java.awt.event.ActionListener action)
-
Constructor Details
-
Gui
public Gui()Constructorclass that creates the startscreen that the user is faced with.
-
-
Method Details
-
buildPlayScreen
public void buildPlayScreen()Builds the full screen that is shown wile the user is playing the game. -
buildPauseScreen
public void buildPauseScreen()Builds the screen that is shown wile the game is in pausemode. -
buildVictoryScreen
public void buildVictoryScreen()Builds the screen that is shown when the user finishes a level. -
buildLoserScreen
public void buildLoserScreen()builds the screen that is shown when the user fails a level. -
buildAboutUsScreen
public void buildAboutUsScreen()Builds the screen that is shown when the player wants to read "about us". -
buildHighscoreScreen
public void buildHighscoreScreen(java.util.ArrayList highscoreList) -
drawNextFrame
public void drawNextFrame(java.awt.image.BufferedImage nextFrameImage)Changes the image in the middle panel when the user is in playmode to make it look like the troops are moving etc.- Parameters:
nextFrameImage-
-
show
public void show()Sets the gui visible -
showPauseButton
public void showPauseButton(java.lang.Boolean b) -
enableSoldierButton
public void enableSoldierButton(java.lang.Boolean b) -
enablePlaneButton
public void enablePlaneButton(java.lang.Boolean b) -
enabledTroopButtons
public void enabledTroopButtons(java.lang.Boolean b) -
enableEnterTPButton
public void enableEnterTPButton(java.lang.Boolean b) -
enableExitTPButton
public void enableExitTPButton(java.lang.Boolean b) -
getName
public java.lang.String getName() -
getPanelWidth
public int getPanelWidth() -
getPanelHeight
public int getPanelHeight() -
newGameResumeNextLevelButton
public void newGameResumeNextLevelButton(java.awt.event.ActionListener action) -
pauseButton
public void pauseButton(java.awt.event.ActionListener action) -
restartLevelButton
public void restartLevelButton(java.awt.event.ActionListener action) -
exitButton
public void exitButton(java.awt.event.ActionListener action) -
helpButton
public void helpButton(java.awt.event.ActionListener action) -
aboutButton
public void aboutButton(java.awt.event.ActionListener action) -
highscoreButton
public void highscoreButton(java.awt.event.ActionListener action) -
turnRight
public void turnRight(java.awt.event.ActionListener action) -
turnLeft
public void turnLeft(java.awt.event.ActionListener action) -
straightAhead
public void straightAhead(java.awt.event.ActionListener action) -
buySoldierButton
public void buySoldierButton(java.awt.event.ActionListener action) -
buyPlainButton
public void buyPlainButton(java.awt.event.ActionListener action) -
setMouseListener
public void setMouseListener(java.awt.event.MouseListener mouse) -
placeEnterTPButton
public void placeEnterTPButton(java.awt.event.ActionListener action) -
placeExitTPButton
public void placeExitTPButton(java.awt.event.ActionListener action)
-