C# Class PantheonPrototype.MenuItem

This is the class that contains a component of the menu screen.
Show file Open project: Bacon41/PantheonPrototype Class Usage Examples

Protected Properties

Property Type Description
background Microsoft.Xna.Framework.Graphics.Texture2D
drawBox Microsoft.Xna.Framework.Rectangle
font Microsoft.Xna.Framework.Graphics.SpriteFont
isDisabled System.Boolean
isSelected System.Boolean
selcted Microsoft.Xna.Framework.Graphics.Texture2D
text string
textSize Vector2

Public Methods

Method Description
Draw ( SpriteBatch spriteBatch ) : void

The method for drawing the item.

Load ( Pantheon gameReference ) : void
MenuItem ( string text, Rectangle percentDrawBox, Vector2 screenCoordinates ) : System

Creats a new menu item with the text "text" at the location of "percentDrawBox." percentDrawBox is given as the "percent points" of the screen.

Update ( GameTime gameTime, Pantheon gameReference ) : void

Method Details

Draw() public method

The method for drawing the item.
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch What is used to draw.
return void

Load() public method

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

MenuItem() public method

Creats a new menu item with the text "text" at the location of "percentDrawBox." percentDrawBox is given as the "percent points" of the screen.
public MenuItem ( string text, Rectangle percentDrawBox, Vector2 screenCoordinates ) : System
text string
percentDrawBox Microsoft.Xna.Framework.Rectangle
screenCoordinates Vector2
return System

Update() public method

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

background protected property

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

drawBox protected property

The draw box for the item.
protected Rectangle,Microsoft.Xna.Framework drawBox
return Microsoft.Xna.Framework.Rectangle

font protected property

protected SpriteFont,Microsoft.Xna.Framework.Graphics font
return Microsoft.Xna.Framework.Graphics.SpriteFont

isDisabled protected property

protected Boolean,System isDisabled
return System.Boolean

isSelected protected property

protected Boolean,System isSelected
return System.Boolean

selcted protected property

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

text protected property

The text to display on the menu item.
protected string text
return string

textSize protected property

protected Vector2 textSize
return Vector2