Jamie Slowgrove - PGG Assignment 2
 All Classes Namespaces Files Functions Variables Typedefs Macros
GameUI.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <iostream>
5 #include <unordered_map>
6 #include "Shader.h"
7 #include "UIObject.h"
8 #include "UI.h"
9 
14 class GameUI : public UI
15 {
16 private:
28  float scoreValue;
30  float heightValue;
31 
32 public:
41  GameUI(std::string vertexShaderFileName, std::string fragmentShaderFileName,
42  std::unordered_map<std::string, Shader*> &shaders, float scoreValue, float heightValue);
43 
50  GameUI(std::unordered_map<std::string, Shader*> &shaders, float scoreValue, float heightValue);
51 
55  ~GameUI();
56 
61  void update(float dt);
62 
66  void draw();
67 
73  void updateValues(float scoreValue, float heightValue);
74 };
GameUI(std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader * > &shaders, float scoreValue, float heightValue)
Definition: GameUI.cpp:6
void updateValues(float scoreValue, float heightValue)
Definition: GameUI.cpp:178
float scoreValue
Definition: GameUI.h:28
UIObject * height
Definition: GameUI.h:20
UIObject * score
Definition: GameUI.h:18
void update(float dt)
Definition: GameUI.cpp:110
A class for the 2D user interfaces.
Definition: UI.h:15
UIObject * scoreText
Definition: GameUI.h:24
UIObject * helpInfo
Definition: GameUI.h:22
GLsizei GLsizei GLuint * shaders
Definition: glew.h:1826
void draw()
Definition: GameUI.cpp:159
float heightValue
Definition: GameUI.h:30
A class for the UI Objects.
Definition: UIObject.h:12
A class for the 2D GameUI that inherits UI.
Definition: GameUI.h:14
~GameUI()
Definition: GameUI.cpp:97
GLsizei const GLchar *const * string
Definition: glew.h:1843
UIObject * heightText
Definition: GameUI.h:26