dEngine
Simple 2D C++ game engine
|
A rectangle with rounded corners. More...
#include <RoundedBox.h>
Public Member Functions | |
void | Setup (SDL_Rect rect, double width, int cornerRadius) |
Initializes a rectangle with rounded corners. More... | |
void | Render () override |
The render method of a component. More... | |
void | Update () override |
The update method of a component. More... | |
![]() | |
void | SetDrawColor (SDL_Color color) |
Set Draw Color. More... | |
Protected Attributes | |
SDL_Rect | boxRect |
int | cornerR |
double | borderWidth |
![]() | |
SDL_Color | drawColor |
Additional Inherited Members | |
![]() | |
std::string | GetVar (std::string key) |
A rectangle with rounded corners.
|
overridevirtual |
The render method of a component.
During the render phase of the program, this function is what draws the component to the screen. This should be overridden for any UIComponents and actually be used to draw to the screen using one of the many SDL_Render functions available.
Implements dengine_UI::UIComponent.
void RoundedBox::Setup | ( | SDL_Rect | rect, |
double | width, | ||
int | cornerRadius | ||
) |
Initializes a rectangle with rounded corners.
rect | The rectangle |
width | |
cornerRadius | The radius of the corners |
|
overridevirtual |
The update method of a component.
During the update phase of the program, this function is what updates and performs any logic within the component. This should be overridden for any UIComponents and actually be used to Update the internal logic of the component. This is called prior to the update anywhere else within the engine.
Implements dengine_UI::UIComponent.
|
protected |
|
protected |
|
protected |