Jamie Slowgrove - PGG Assignment 2
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
UI Class Referenceabstract

A class for the 2D user interfaces. More...

#include <UI.h>

Inheritance diagram for UI:
Inheritance graph
Collaboration diagram for UI:
Collaboration graph

Public Member Functions

 UI (std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader * > &shaders)
 
 UI (std::unordered_map< std::string, Shader * > &shaders)
 
 ~UI ()
 
virtual void update (float dt)=0
 
virtual void draw ()=0
 

Protected Member Functions

void initialiseShaders (std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader * > &shaders)
 

Protected Attributes

Shadershader
 

Detailed Description

A class for the 2D user interfaces.

Author
Jamie Slowgrove

Constructor & Destructor Documentation

UI::UI ( std::string  vertexShaderFileName,
std::string  fragmentShaderFileName,
std::unordered_map< std::string, Shader * > &  shaders 
)

Constructs the UI object.

Parameters
vertexShaderFileNameThe name of the vertex shader file.
fragmentShaderFileNameThe name of the fragment shader file.
shadersA reference to the loaded Shader files

Here is the call graph for this function:

UI::UI ( std::unordered_map< std::string, Shader * > &  shaders)

Constructs the UI object.

Parameters
shadersA reference to the loaded Shader files

Here is the call graph for this function:

UI::~UI ( )

Destructs the UI object.

Member Function Documentation

virtual void UI::draw ( )
pure virtual

A pure virtual function to draw to the screen.

Implemented in GameUI, MainMenuUI, EndGameUI, LoadingScreen, CreditsUI, and HelpUI.

void UI::initialiseShaders ( std::string  vertexShaderFileName,
std::string  fragmentShaderFileName,
std::unordered_map< std::string, Shader * > &  shaders 
)
protected

Initialise the shaders.

Parameters
vertexShaderFileNameThe name of the vertex shader file.
fragmentShaderFileNameThe name of the fragment shader file.
shadersA reference to the loaded Shader files

Here is the caller graph for this function:

virtual void UI::update ( float  dt)
pure virtual

A pure virtual function to update the UI.

Parameters
dtThe delta time.

Implemented in GameUI, MainMenuUI, EndGameUI, LoadingScreen, CreditsUI, and HelpUI.

Member Data Documentation

Shader* UI::shader
protected

The shader for the UI


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