vooga.engine.overlay
Class OverlayPanel

java.lang.Object
  extended by SpriteGroup
      extended by vooga.engine.overlay.OverlayPanel

public class OverlayPanel
extends SpriteGroup

The OverlayPanel provides a convenient way for users to evenly place overlays across the top or bottom of the screen. About 3 overlays or less is recommended since OverlayPanel does not take measures to prevent overlapping.

OverlayTracker track = OverlayCreator.createOverlays("src/vooga/examples/overlay/sample/resources/myOverlays.xml"); OverlayPanel panel = new Overlay("Overlays", this, true); panel.add(track.getOverlay("overlay_1")); panel.initialize(); playField.add(panel);


Constructor Summary
OverlayPanel(java.lang.String name, Game game, boolean topOrBottom)
          Constructs the initial panel with a given world, and establishing its position on the top or bottom.
 
Method Summary
 void initialize()
          This sets up the panel by calculating important values in the OverlayPanel regarding spacing of the Overlays and it also places the OverlayPanel into the world.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverlayPanel

public OverlayPanel(java.lang.String name,
                    Game game,
                    boolean topOrBottom)
Constructs the initial panel with a given world, and establishing its position on the top or bottom.

Parameters:
game -
topOrBottom -
Method Detail

initialize

public void initialize()
This sets up the panel by calculating important values in the OverlayPanel regarding spacing of the Overlays and it also places the OverlayPanel into the world. It also builds the Overlay SpriteGroup.