Корабът Радецки - Eight ball pool v 1.0
The documnetation for our physics-themed project.
CheckBox Class Reference

#include <ui_elements.hpp>

Inheritance diagram for CheckBox:
UIElement DrawableManager::Drawable

Public Member Functions

 CheckBox (const char *text, Rectangle bounds, float rotation, bool checked=false)
 
virtual ~CheckBox ()=default
 
void Draw () override
 Draws the sprites. More...
 
bool IsChecked ()
 Checks whether or not any of the checkboxes are checked. More...
 
void SetChecked (bool value)
 Sets the "Checked" status of the boxes. More...
 
- Public Member Functions inherited from UIElement
 UIElement (Rectangle bounds, float rotation)
 
virtual ~UIElement ()=default
 
void SetPosition (Vector2 position)
 
Vector2 GetPosition ()
 
void SetRotation (float rotation)
 
float GetRotation ()
 
void SetSize (Vector2 size)
 
Vector2 GetSize ()
 
- Public Member Functions inherited from DrawableManager::Drawable
 Drawable ()
 Sets the sprites' IDs. More...
 
virtual ~Drawable ()=default
 
virtual void Create ()
 
virtual void Update ()
 
int GetID ()
 

Protected Attributes

const char * placeholder_text
 
- Protected Attributes inherited from UIElement
Rectangle bounds
 
float rotation
 

Constructor & Destructor Documentation

◆ CheckBox()

CheckBox::CheckBox ( const char *  text,
Rectangle  bounds,
float  rotation,
bool  checked = false 
)
inline

◆ ~CheckBox()

virtual CheckBox::~CheckBox ( )
virtualdefault

Member Function Documentation

◆ Draw()

void CheckBox::Draw ( )
overridevirtual

Draws the sprites.

Reimplemented from DrawableManager::Drawable.

◆ IsChecked()

bool CheckBox::IsChecked ( )

Checks whether or not any of the checkboxes are checked.

Returns
bool (if the box checked)

◆ SetChecked()

void CheckBox::SetChecked ( bool  value)

Sets the "Checked" status of the boxes.

Parameters
valueThis describes the output from the IsChecked() function
See also
IsChecked()

Member Data Documentation

◆ placeholder_text

const char* CheckBox::placeholder_text
protected