33 lines
607 B
C++
33 lines
607 B
C++
#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
|