Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
fireworks::graphics::Label Class Reference

The label class to render text onto the screen. More...

#include <label.h>

Collaboration diagram for fireworks::graphics::Label:

Public Member Functions

 Label (const char *text, glm::vec3 position, glm::vec3 color, Font &font)
 Creates a new label to render text onto the screen. More...
 
void renderText () const
 Renders the text onto the screen. More...
 

Public Attributes

std::string text
 The text of the label. More...
 
glm::vec3 position
 The position of the label. More...
 
glm::vec3 color
 The color of the label. More...
 
Font font
 The font used to render the label. More...
 

Detailed Description

The label class to render text onto the screen.

Constructor & Destructor Documentation

◆ Label()

fireworks::graphics::Label::Label ( const char *  text,
glm::vec3  position,
glm::vec3  color,
Font font 
)

Creates a new label to render text onto the screen.

Parameters
textThe text to render to the screen
positionThe position on the screen where the Label will be places
colorThe color of the Label
fontThe font used to render the Label
Warning
The position to render the text on the screen is in the limits X : (0, 800) and Y : (0, 600) This will be later updates to use the camera's orthogonal matrix to make things simpler

Member Function Documentation

◆ renderText()

void fireworks::graphics::Label::renderText ( ) const

Renders the text onto the screen.

Member Data Documentation

◆ color

glm::vec3 fireworks::graphics::Label::color

The color of the label.

◆ font

Font fireworks::graphics::Label::font

The font used to render the label.

◆ position

glm::vec3 fireworks::graphics::Label::position

The position of the label.

◆ text

std::string fireworks::graphics::Label::text

The text of the label.


The documentation for this class was generated from the following files: