Working FontManager and Label implementation (WIP)

This commit is contained in:
Corentin 2021-07-12 17:30:44 +09:00
commit af6967151e
15 changed files with 608 additions and 61 deletions

View 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