C# Класс PantheonPrototype.MenuItem

This is the class that contains a component of the menu screen.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Описание методов

Draw() публичный Метод

The method for drawing the item.
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch What is used to draw.
Результат void

Load() публичный Метод

public Load ( Pantheon gameReference ) : void
gameReference Pantheon
Результат void

MenuItem() публичный Метод

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
Результат System

Update() публичный Метод

public Update ( GameTime gameTime, Pantheon gameReference ) : void
gameTime Microsoft.Xna.Framework.GameTime How much time has elapsed.
gameReference Pantheon The reference to everything.
Результат void

Описание свойств

background защищенное свойство

protected Texture2D,Microsoft.Xna.Framework.Graphics background
Результат Microsoft.Xna.Framework.Graphics.Texture2D

drawBox защищенное свойство

The draw box for the item.
protected Rectangle,Microsoft.Xna.Framework drawBox
Результат Microsoft.Xna.Framework.Rectangle

font защищенное свойство

protected SpriteFont,Microsoft.Xna.Framework.Graphics font
Результат Microsoft.Xna.Framework.Graphics.SpriteFont

isDisabled защищенное свойство

protected Boolean,System isDisabled
Результат System.Boolean

isSelected защищенное свойство

protected Boolean,System isSelected
Результат System.Boolean

selcted защищенное свойство

protected Texture2D,Microsoft.Xna.Framework.Graphics selcted
Результат Microsoft.Xna.Framework.Graphics.Texture2D

text защищенное свойство

The text to display on the menu item.
protected string text
Результат string

textSize защищенное свойство

protected Vector2 textSize
Результат Vector2