C# Class PantheonPrototype.Menu

This is the class for drawing our pause menu.
Show file Open project: Bacon41/PantheonPrototype Class Usage Examples

Protected Properties

Property Type Description
SCREEN_HEIGHT int
SCREEN_WIDTH int
creditsButtons MenuItem>.Dictionary
creditsRect Microsoft.Xna.Framework.Rectangle
first bool
inventory Inventory
inventoryBackground Microsoft.Xna.Framework.Graphics.Texture2D
inventoryBackgroundTex Microsoft.Xna.Framework.Graphics.Texture2D
inventoryButtons MenuItem>.Dictionary
items MenuItem>.Dictionary
mainBackgroundRect Microsoft.Xna.Framework.Rectangle
mainBackgroundTex Microsoft.Xna.Framework.Graphics.Texture2D
menuState String
offset int
splashScreen Microsoft.Xna.Framework.Graphics.Texture2D
splashScreenButtons MenuItem>.Dictionary
splashScreenMask Microsoft.Xna.Framework.Graphics.Texture2D
splashScreenRect Microsoft.Xna.Framework.Rectangle
splashShine Microsoft.Xna.Framework.Graphics.Texture2D
splashText String

Public Methods

Method Description
Draw ( SpriteBatch spriteBatch, SpriteFont Font, SpriteFont Splash ) : void

The method for drawing the whole menu.

Load ( Pantheon gameReference ) : void
Menu ( int SCREEN_WIDTH, int SCREEN_HEIGHT ) : System
Update ( GameTime gameTime, Pantheon gameReference ) : void

The method for updating the menu items.

Private Methods

Method Description
loadDefaultMenu ( Pantheon gameReference ) : void

This is the method to set up a basic menu with items in it (resume / exit).

Method Details

Draw() public method

The method for drawing the whole menu.
public Draw ( SpriteBatch spriteBatch, SpriteFont Font, SpriteFont Splash ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch What is used to draw.
Font Microsoft.Xna.Framework.Graphics.SpriteFont
Splash Microsoft.Xna.Framework.Graphics.SpriteFont
return void

Load() public method

public Load ( Pantheon gameReference ) : void
gameReference Pantheon
return void

Menu() public method

public Menu ( int SCREEN_WIDTH, int SCREEN_HEIGHT ) : System
SCREEN_WIDTH int
SCREEN_HEIGHT int
return System

Update() public method

The method for updating the menu items.
public Update ( GameTime gameTime, Pantheon gameReference ) : void
gameTime Microsoft.Xna.Framework.GameTime How much time has elapsed.
gameReference Pantheon The reference to everything.
return void

Property Details

SCREEN_HEIGHT protected property

protected int SCREEN_HEIGHT
return int

SCREEN_WIDTH protected property

protected int SCREEN_WIDTH
return int

creditsButtons protected property

protected Dictionary creditsButtons
return MenuItem>.Dictionary

creditsRect protected property

protected Rectangle,Microsoft.Xna.Framework creditsRect
return Microsoft.Xna.Framework.Rectangle

first protected property

protected bool first
return bool

inventory protected property

protected Inventory,PantheonPrototype inventory
return Inventory

inventoryBackground protected property

protected Texture2D,Microsoft.Xna.Framework.Graphics inventoryBackground
return Microsoft.Xna.Framework.Graphics.Texture2D

inventoryBackgroundTex protected property

protected Texture2D,Microsoft.Xna.Framework.Graphics inventoryBackgroundTex
return Microsoft.Xna.Framework.Graphics.Texture2D

inventoryButtons protected property

protected Dictionary inventoryButtons
return MenuItem>.Dictionary

items protected property

protected Dictionary items
return MenuItem>.Dictionary

mainBackgroundRect protected property

protected Rectangle,Microsoft.Xna.Framework mainBackgroundRect
return Microsoft.Xna.Framework.Rectangle

mainBackgroundTex protected property

protected Texture2D,Microsoft.Xna.Framework.Graphics mainBackgroundTex
return Microsoft.Xna.Framework.Graphics.Texture2D

menuState protected property

protected String menuState
return String

offset protected property

protected int offset
return int

splashScreen protected property

protected Texture2D,Microsoft.Xna.Framework.Graphics splashScreen
return Microsoft.Xna.Framework.Graphics.Texture2D

splashScreenButtons protected property

protected Dictionary splashScreenButtons
return MenuItem>.Dictionary

splashScreenMask protected property

protected Texture2D,Microsoft.Xna.Framework.Graphics splashScreenMask
return Microsoft.Xna.Framework.Graphics.Texture2D

splashScreenRect protected property

protected Rectangle,Microsoft.Xna.Framework splashScreenRect
return Microsoft.Xna.Framework.Rectangle

splashShine protected property

protected Texture2D,Microsoft.Xna.Framework.Graphics splashShine
return Microsoft.Xna.Framework.Graphics.Texture2D

splashText protected property

protected String splashText
return String