dEngine
Simple 2D C++ game engine
Public Member Functions | Private Attributes | List of all members
dengine_UI::Circle Class Reference

A hollow circle. More...

#include <Circle.h>

Inheritance diagram for dengine_UI::Circle:
dengine_UI::UIComponent

Public Member Functions

void Setup (Vec2 center, int radius)
 
void Render () override
 The render method of a component. More...
 
void Update () override
 The update method of a component. More...
 
- Public Member Functions inherited from dengine_UI::UIComponent
void SetDrawColor (SDL_Color color)
 Set Draw Color. More...
 

Private Attributes

Vec2 centerPoint
 
int r
 

Additional Inherited Members

- Protected Member Functions inherited from dengine_UI::UIComponent
std::string GetVar (std::string key)
 
- Protected Attributes inherited from dengine_UI::UIComponent
SDL_Color drawColor
 

Detailed Description

A hollow circle.

Member Function Documentation

◆ Render()

void Circle::Render ( )
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.

◆ Setup()

void Circle::Setup ( Vec2  center,
int  radius 
)

Initializes a hollow circle to be displayed on screen

Parameters
centerA vec2 denoting the center of the circle
radiusThe radius of the circle in pixels

◆ Update()

void Circle::Update ( )
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.

Member Data Documentation

◆ centerPoint

Vec2 dengine_UI::Circle::centerPoint
private

◆ r

int dengine_UI::Circle::r
private