dEngine
Simple 2D C++ game engine
UIComponent.h
Go to the documentation of this file.
1 #ifndef DENGINE_UICOMPONENT_H
2 #define DENGINE_UICOMPONENT_H
3 #include <map>
4 #include <string>
5 #include <SDL.h>
6 
7 namespace dengine_UI {
14  class UIComponent {
15  public:
22  virtual void Render() = 0;
23 
30  virtual void Update() = 0;
31 
37  void SetDrawColor(SDL_Color color){
38  drawColor = color;
39  }
40  protected:
41  std::string GetVar(std::string key);
42  SDL_Color drawColor;
43  };
44 };
45 
46 #endif //DENGINE_UICOMPONENT_H
SDL_Color drawColor
Definition: UIComponent.h:42
std::string GetVar(std::string key)
A component of a UI window.
Definition: UIComponent.h:14
Definition: Circle.h:11
virtual void Update()=0
The update method of a component.
virtual void Render()=0
The render method of a component.
void SetDrawColor(SDL_Color color)
Set Draw Color.
Definition: UIComponent.h:37