vooga.gameEngine.item
Class MenuScreen

java.lang.Object
  extended by vooga.gameEngine.game.GameRelatedObject
      extended by vooga.gameEngine.item.GameItem
          extended by vooga.gameEngine.item.StaticItem
              extended by vooga.gameEngine.item.MenuScreen
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Renderable>, java.util.EventListener, Renderable, Tangible, PositionChangeListener, RotationChangeListener, SizeChangeListener, TangibleListener

public class MenuScreen
extends StaticItem

Class MenuScreen represents a StaticItem that will always take up the entire viewable space.

Author:
Justin C. Klaassen
See Also:
Serialized Form

Constructor Summary
MenuScreen(Tangible b, java.awt.Color c, int index)
          Constructor for creating a new MenuScreen representing a solid color that is guaranteed to always cover the entire screen.
MenuScreen(Tangible b, java.net.URL imageFile, int index)
          Constructor for creating a new MenuScreen from an URL that is pointing to a desired image.
 
Method Summary
 
Methods inherited from class vooga.gameEngine.item.StaticItem
positionChanged, rotationChanged, sizeChanged
 
Methods inherited from class vooga.gameEngine.item.GameItem
compareTo, getPosition, getRotation, getShape, getSize, getTexture, isVisible, move, resize, rotate, setPosition, setRotation, setSize, setVisibility
 
Methods inherited from class vooga.gameEngine.game.GameRelatedObject
addEventListener, clearListeners, equals, fire, fire, fire, getEventListeners, getID, getListenerCount, removeEventListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuScreen

public MenuScreen(Tangible b,
                  java.awt.Color c,
                  int index)
Constructor for creating a new MenuScreen representing a solid color that is guaranteed to always cover the entire screen. A MenuScreen is initially set to not be visible.

Parameters:
cc - is the camera
imageFile - points to the image to be used to represent this item
index - is the layer that this item should be rendered on, with items with lower indexes being rendered on top

MenuScreen

public MenuScreen(Tangible b,
                  java.net.URL imageFile,
                  int index)
Constructor for creating a new MenuScreen from an URL that is pointing to a desired image. It is up to the user to ensure the image is the correct aspect ratio as the picture will automatically be resized to fill the entire screen no matter how the [@link CameraController} changes. A MenuScreen is initially set to not be visible.

Parameters:
cc - is the camera
imageFile - points to the image to be used to represent this item
index - is the layer that this item should be rendered on, with items with lower indexes being rendered on top