dEngine
Simple 2D C++ game engine
HollowRect.h
Go to the documentation of this file.
1 //
2 // Created by ernes on 7/16/2023.
3 //
4 
5 #ifndef DENGINE_HOLLOWRECT_H
6 #define DENGINE_HOLLOWRECT_H
7 #include "../UIComponent.h"
8 #include <SDL.h>
9 #include <cmath>
10 #include "../../System/Game.h"
11 
12 
13 namespace dengine_UI {
17  class HollowRect : public UIComponent {
18  public:
24  void Setup(SDL_Rect rect, int width);
25 
26  void Render() override;
27  void Update() override;
28 
29 
30  private:
31  SDL_Rect boxRect;
33  };
34 }
35 
36 
37 #endif //DENGINE_HOLLOWRECT_H
SDL_Rect boxRect
Definition: HollowRect.h:31
A rectangle with a hollow or transparent center.
Definition: HollowRect.h:17
void Setup(SDL_Rect rect, int width)
Definition: HollowRect.cpp:6
int borderWidth
Definition: HollowRect.h:32
A component of a UI window.
Definition: UIComponent.h:14
Definition: Circle.h:11
void Render() override
The render method of a component.
Definition: HollowRect.cpp:13
void Update() override
The update method of a component.
Definition: HollowRect.cpp:11