moagg.game.menu
Class AbstractMenu

java.lang.Object
  extended by com.golden.gamedev.GameObject
      extended by moagg.game.menu.AbstractMenu
Direct Known Subclasses:
ControlsMenu, GameMenu, GhostMenu, InGameSettingsMenu, JoinMultiPlayerMenu, MainMenu, MissionMenu, NetworkMenu, PlayerMenu, SelectDifficultyScreen, SelectLanguageScreen, SettingsMenu, SystemMenu

public abstract class AbstractMenu
extends com.golden.gamedev.GameObject


Nested Class Summary
protected  class AbstractMenu.MenuItem
           
 
Field Summary
protected  java.awt.image.BufferedImage background
           
protected  com.golden.gamedev.object.GameFont font
           
protected static java.lang.String KEY_SWITCH_PREFIX
           
protected  int maxTextWidth
           
protected  java.util.List<AbstractMenu.MenuItem> menuItems
           
protected  int selectedItemIndex
           
 
Fields inherited from class com.golden.gamedev.GameObject
bsGraphics, bsInput, bsIO, bsLoader, bsMusic, bsSound, bsTimer, fontManager, parent
 
Constructor Summary
protected AbstractMenu(com.golden.gamedev.GameEngine parent)
           
protected AbstractMenu(com.golden.gamedev.GameEngine parent, java.awt.image.BufferedImage background)
           
 
Method Summary
protected abstract  void enter()
           
protected abstract  void initMenuItems()
           
 void initResources()
           
 void render(java.awt.Graphics2D g)
           
protected  void renderText(java.awt.Graphics2D g, java.lang.String text, int x, int y, boolean highlighted)
           
 void update(long elapsedTime)
           
protected  void updateMaxTextWidth(java.lang.String text)
           
 
Methods inherited from class com.golden.gamedev.GameObject
checkPosMouse, checkPosMouse, click, drawFPS, finish, getCurrentFPS, getFPS, getHeight, getImage, getImage, getImages, getImages, getImages, getImages, getImages, getImages, getMouseX, getMouseY, getRandom, getWidth, hideCursor, keyDown, keyPressed, playMusic, playSound, rightClick, setFPS, setMaskColor, showCursor, start, takeScreenShot, takeScreenShot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_SWITCH_PREFIX

protected static final java.lang.String KEY_SWITCH_PREFIX
See Also:
Constant Field Values

background

protected java.awt.image.BufferedImage background

menuItems

protected java.util.List<AbstractMenu.MenuItem> menuItems

selectedItemIndex

protected int selectedItemIndex

font

protected com.golden.gamedev.object.GameFont font

maxTextWidth

protected int maxTextWidth
Constructor Detail

AbstractMenu

protected AbstractMenu(com.golden.gamedev.GameEngine parent)

AbstractMenu

protected AbstractMenu(com.golden.gamedev.GameEngine parent,
                       java.awt.image.BufferedImage background)
Method Detail

initResources

public void initResources()
Specified by:
initResources in class com.golden.gamedev.GameObject

initMenuItems

protected abstract void initMenuItems()

updateMaxTextWidth

protected void updateMaxTextWidth(java.lang.String text)

render

public void render(java.awt.Graphics2D g)
Specified by:
render in class com.golden.gamedev.GameObject

renderText

protected void renderText(java.awt.Graphics2D g,
                          java.lang.String text,
                          int x,
                          int y,
                          boolean highlighted)

update

public void update(long elapsedTime)
Specified by:
update in class com.golden.gamedev.GameObject

enter

protected abstract void enter()


Copyright © 2008. All Rights Reserved.