VAPOR3 3.9.4
TextLabel.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <glm/glm.hpp>
5
6namespace VAPoR {
7
8struct GLManager;
9class Font;
10
20
21class TextLabel {
22 GLManager *_glManager;
23
24public:
26
27 std::string FontName;
28 unsigned int FontSize;
29 glm::vec4 BackgroundColor;
30 glm::vec4 ForegroundColor;
33 float Padding;
34
35 TextLabel(GLManager *glManager, const std::string &fontName, unsigned int fontSize);
36
44 void DrawText(const glm::vec3 &position, const std::string &text);
45 void DrawText(const glm::vec2 &position, const std::string &text);
46
47 Font *GetFont() const;
48};
49
50} // namespace VAPoR
Renders charachter glyphs using FreeType2 This class does not do any transformation,...
Definition: Font.h:24
Utitlity wrapper for Font class.
Definition: TextLabel.h:21
Alignment HorizontalAlignment
Definition: TextLabel.h:31
glm::vec4 BackgroundColor
Definition: TextLabel.h:29
std::string FontName
Definition: TextLabel.h:27
Font * GetFont() const
glm::vec4 ForegroundColor
Definition: TextLabel.h:30
void DrawText(const glm::vec2 &position, const std::string &text)
TextLabel(GLManager *glManager, const std::string &fontName, unsigned int fontSize)
Alignment VerticalAlignment
Definition: TextLabel.h:32
void DrawText(const glm::vec3 &position, const std::string &text)
unsigned int FontSize
Definition: TextLabel.h:28
Contains references to context scope OpenGL data.
Definition: GLManager.h:18