MuScreenManager  1.0
MuScreenManager is an XNA class library that provides a screen management system, allowing for the simple integration of menus and other screens into your game.
 All Classes Namespaces Functions Variables Enumerations Properties
MuScreenManager.ScreenManager Class Reference

Core ScreenManager engine, used to control, manage and display multiple GameScreens for an XNA game More...

Public Member Functions

 ScreenManager (Game game, GraphicsDevice graphicsDevice, string contentDir, SpriteFont font, AudioSettings audioSettings)
 Initialize an instance of the ScreenManager
 ScreenManager (Game game, GraphicsDevice graphicsDevice, string contentDir, SpriteFont font)
 Initialize an instance of the ScreenManager
 ScreenManager (Game game, GraphicsDevice graphicsDevice, string contentDir, AudioSettings audioSettings)
 Initialize an instance of the ScreenManager
 ScreenManager (Game game, GraphicsDevice graphicsDevice, string contentDir)
 Initialize an instance of the ScreenManager
override void Update (GameTime gameTime)
 Update the ScreenManager and all screens within
override void Draw (GameTime gameTime)
 Draw the screens within ScreenManager
void AddScreen (Screen screen)
 Add a screen to this ScreenManager
void RemoveScreen (Screen screen)
 Remove the screen from active ScreenManager
void RemoveAllScreens ()
 Remove all screens from the current screen rotation
GetScreen< T > (int screenNum=0)
 Find a screen in the screen list of a specific type
void ChangeAllScreenStates (ScreenState screenState, Screen unchangedScreen=null)
 Change the ScreenState in all currently active screens

Properties

new Game Game [get]
new GraphicsDevice GraphicsDevice [get]
Input Input [get]
Audio Audio [get]
string ContentDir [get]
SpriteFont Font [get]
Vector2 ScreenDimensions [get]
 Get the full screen dimensions for this game

Detailed Description

Core ScreenManager engine, used to control, manage and display multiple GameScreens for an XNA game

Constructor & Destructor Documentation

MuScreenManager.ScreenManager.ScreenManager ( Game  game,
GraphicsDevice  graphicsDevice,
string  contentDir,
SpriteFont  font,
AudioSettings  audioSettings 
)

Initialize an instance of the ScreenManager

Parameters
gameReference to the initial game that created it all
graphicsDeviceGame's generated GraphicsDevice
contentDirDirectory where the content from the Content project
fontGlobal font used throughout the ScreenManager and menus
audioSettingsSettings to generate a SoundManager using
MuScreenManager.ScreenManager.ScreenManager ( Game  game,
GraphicsDevice  graphicsDevice,
string  contentDir,
SpriteFont  font 
)

Initialize an instance of the ScreenManager

Parameters
gameReference to the initial game that created it all
graphicsDeviceGame's generated GraphicsDevice
contentDirDirectory where the content from the Content project
fontGlobal font used throughout the ScreenManager and menus
MuScreenManager.ScreenManager.ScreenManager ( Game  game,
GraphicsDevice  graphicsDevice,
string  contentDir,
AudioSettings  audioSettings 
)

Initialize an instance of the ScreenManager

Parameters
gameReference to the initial game that created it all
graphicsDeviceGame's generated GraphicsDevice
contentDirDirectory where the content from the Content project
audioSettingsGlobal font used throughout the ScreenManager and menus
MuScreenManager.ScreenManager.ScreenManager ( Game  game,
GraphicsDevice  graphicsDevice,
string  contentDir 
)

Initialize an instance of the ScreenManager

Parameters
gameReference to the initial game that created it all
graphicsDeviceGame's generated GraphicsDevice
contentDirDirectory where the content from the Content project

Member Function Documentation

void MuScreenManager.ScreenManager.AddScreen ( Screen  screen)

Add a screen to this ScreenManager

Parameters
screenScreen to add to rotation
void MuScreenManager.ScreenManager.ChangeAllScreenStates ( ScreenState  screenState,
Screen  unchangedScreen = null 
)

Change the ScreenState in all currently active screens

Parameters
screenStateScreenState to change all screens to
unchangedScreenScreen to not change the ScreenState of
override void MuScreenManager.ScreenManager.Draw ( GameTime  gameTime)

Draw the screens within ScreenManager

Parameters
gameTimeProvides a snapshot of the game time
T MuScreenManager.ScreenManager.GetScreen< T > ( int  screenNum = 0)

Find a screen in the screen list of a specific type

Template Parameters
TType to search for
Parameters
screenNumIndex of the item
Returns
Found screen of type T
Type Constraints
T :Screen 
void MuScreenManager.ScreenManager.RemoveAllScreens ( )

Remove all screens from the current screen rotation

void MuScreenManager.ScreenManager.RemoveScreen ( Screen  screen)

Remove the screen from active ScreenManager

Parameters
screenScreen to remove from rotation
override void MuScreenManager.ScreenManager.Update ( GameTime  gameTime)

Update the ScreenManager and all screens within

Parameters
gameTimeProvides a snapshot of the game time

Property Documentation

Vector2 MuScreenManager.ScreenManager.ScreenDimensions
get

Get the full screen dimensions for this game


The documentation for this class was generated from the following file: