Working FontManager and Label implementation (WIP)
This commit is contained in:
parent
3b2be83590
commit
af6967151e
15 changed files with 608 additions and 61 deletions
33
include/uui/opengl/label.hpp
Normal file
33
include/uui/opengl/label.hpp
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
#include "uui/opengl/component.hpp"
|
||||
|
||||
namespace uui
|
||||
{
|
||||
class GlLabel: public GlComponent
|
||||
{
|
||||
friend class GlWindow;
|
||||
|
||||
size_t font_index;
|
||||
|
||||
float get_width() const;
|
||||
float get_height() const;
|
||||
|
||||
protected:
|
||||
std::string text;
|
||||
const std::tuple<float, float, float, float>& text_color;
|
||||
|
||||
int text_width;
|
||||
int text_height;
|
||||
|
||||
GlLabel(
|
||||
std::shared_ptr<GlWindow> window, const std::variant<int, float> x, const std::variant<int, float> y, const std::string& text,
|
||||
const std::tuple<float, float, float, float>& text_color);
|
||||
|
||||
void render();
|
||||
};
|
||||
|
||||
} // namespace uui
|
||||
Loading…
Add table
Add a link
Reference in a new issue