Arcade Shooter
Public Member Functions | List of all members
Sample::MainMenuScreen Class Reference

The main menu for the sample game. More...

#include <MainMenuScreen.h>

Inheritance diagram for Sample::MainMenuScreen:
Sample::MenuScreen KatanaEngine::MenuScreen KatanaEngine::Screen

Public Member Functions

virtual void LoadContent (ResourceManager *pResourceManager)
 Called when resources need to be loaded. More...
 
virtual void Draw (SpriteBatch *pSpriteBatch)
 Called when the game determines it is time to draw a frame. More...
 
- Public Member Functions inherited from Sample::MenuScreen
virtual void Update (const GameTime *pGameTime)
 Called when the game has determined that screen logic needs to be processed. More...
 
- Public Member Functions inherited from KatanaEngine::MenuScreen
virtual void HandleInput (const InputState *pInput)
 Called when the game has determined that player input needs to be processed. More...
 
virtual void Update (const GameTime *pGameTime)
 Called when the game has determined that screen logic needs to be processed. More...
 
virtual void Draw (SpriteBatch *pSpriteBatch)
 Called when the game determines it is time to draw a frame. More...
 
virtual void SetItemListWrapping (const bool wraps)
 Sets whether scrolling past the end of the menu returns the selection back to the first item. More...
 
- Public Member Functions inherited from KatanaEngine::Screen
virtual void LoadContent (ResourceManager *pResourceManager)
 Called when resources need to be loaded. More...
 
virtual void UnloadContent ()
 Called when resources need to be unloaded. Override this method to unload any screen-specific resources.
 
virtual bool IsExiting () const
 Determines if the screen is currently exiting. More...
 
float GetAlpha () const
 Gets the overall screen transition alpha value (or opacity). This is handy for fading screens in and out. More...
 
virtual ScreenManagerGetScreenManager ()
 Gets a pointer to the ScreenManager, for managing game screens. More...
 
virtual GameGetGame () const
 Gets a pointer to the Game. More...
 
virtual ParticleManagerGetParticleManager () const
 Gets a pointer to the ParticleManager, for creating and managing particles. More...
 
virtual void SetScreenManager (ScreenManager *pScreenManager)
 Gets a pointer to the ScreenManager, for managing game screens. More...
 
virtual void Show ()
 Tells the screen to transition in.
 
virtual void Exit ()
 Tells the screen to transition out. When the screen has completed its transition, UnloadContent() will be called, and the ScreenManager will remove it. More...
 
virtual void SetExitCallback (OnExit callback)
 Sets the callback function for when the Exit() is called. More...
 
virtual void SetRemoveCallback (OnRemove callback)
 Sets the callback function for when the screen is about to be removed by the screen manager. More...
 
virtual double GetTransitionOutTime () const
 Get the time in seconds that the screen will transition out. More...
 

Additional Inherited Members

- Protected Types inherited from KatanaEngine::Screen
enum  ScreenTransition {
  ScreenTransition::NONE,
  ScreenTransition::IN,
  ScreenTransition::OUT
}
 Defines the state of the transition between screens. More...
 
- Protected Member Functions inherited from Sample::MenuScreen
virtual void AddMenuItem (MenuItem *pItem)
 Adds a menu item to the screen. More...
 
virtual void SetMenuPosition (const Vector2 position)
 Sets the position of the first menu item. More...
 
- Protected Member Functions inherited from KatanaEngine::MenuScreen
virtual void AddMenuItem (MenuItem *pItem)
 Adds a menu item to the screen. More...
 
virtual MenuItemGetSelectedItem () const
 Get the currently selected menu item. More...
 
virtual MenuItemGetMenuItem (const int itemIndex) const
 Get a menu item by providing it's index. More...
 
virtual void SetSelectedItem (const int itemIndex)
 Set the selected menu item by providing it's index. More...
 
virtual void SetDisplayCount (const unsigned int count)
 Set how many menu items to display. More...
 
virtual int GetDisplayCount () const
 Get the number of menu items that are set to display. More...
 
virtual int GetDisplayStartIndex () const
 Get the index corresponding to the first displayed menu item. More...
 
- Protected Member Functions inherited from KatanaEngine::Screen
virtual void SetPassthroughFlags (const bool draw=false, const bool update=false, const bool handleInput=false)
 Sets the flags that determine if the underlaying screen should handle input, update, and/or render. More...
 
virtual void SetTransitionInTime (double seconds)
 Set the time in seconds that the screen should transition in. More...
 
virtual void SetTransitionOutTime (double seconds)
 Set the time in seconds that the screen should transition out. More...
 
virtual double GetTransitionInTime () const
 Get the time in seconds that the screen will transition in. More...
 
virtual ScreenTransition GetTransition () const
 Get the current transition state of the screen. More...
 
virtual float GetTransitionValue () const
 Get the interpolated value (between zero and one) of the screen transition. More...
 
virtual bool NeedsToBeRemoved () const
 Determines if the screen has completely faded out and needs to be removed by the ScreenManager. More...
 
virtual void UseRenderTarget ()
 Forces all screen rendering to a render target.
 
virtual RenderTargetGetRenderTarget () const
 Get screen's render target. More...
 
virtual Color GetRenderTargetColor () const
 Get the color that will be used to tint the render target. More...
 

Detailed Description

The main menu for the sample game.

Member Function Documentation

◆ Draw()

void Sample::MainMenuScreen::Draw ( SpriteBatch pSpriteBatch)
virtual

Called when the game determines it is time to draw a frame.

Parameters
pSpriteBatchThe game's sprite batch, used for rendering.

◆ LoadContent()

void Sample::MainMenuScreen::LoadContent ( ResourceManager pResourceManager)
virtual

Called when resources need to be loaded.

Parameters
pResourceManagerThe game's resource manager, used for loading and managing game resources.

Reimplemented from Sample::MenuScreen.


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