A class for the 2D user interfaces. More...
#include <UI.h>
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 | |
Shader * | shader |
A class for the 2D user interfaces.
UI::UI | ( | std::string | vertexShaderFileName, |
std::string | fragmentShaderFileName, | ||
std::unordered_map< std::string, Shader * > & | shaders | ||
) |
UI::UI | ( | std::unordered_map< std::string, Shader * > & | shaders | ) |
UI::~UI | ( | ) |
Destructs the UI object.
|
pure virtual |
A pure virtual function to draw to the screen.
Implemented in GameUI, MainMenuUI, EndGameUI, LoadingScreen, CreditsUI, and HelpUI.
|
protected |
Initialise the shaders.
vertexShaderFileName | The name of the vertex shader file. |
fragmentShaderFileName | The name of the fragment shader file. |
shaders | A reference to the loaded Shader files |
|
pure virtual |
A pure virtual function to update the UI.
dt | The delta time. |
Implemented in GameUI, MainMenuUI, EndGameUI, LoadingScreen, CreditsUI, and HelpUI.