Stack component implemented (more flex than stack)

This commit is contained in:
Corentin 2021-07-18 01:19:44 +09:00
commit 2ba59d8e37
17 changed files with 426 additions and 100 deletions

View file

@ -4,12 +4,15 @@
#include <tuple>
#include "uui/opengl/component.hpp"
#include "uui/opengl/container.hpp"
namespace uui
{
class GlStack;
class GlLabel: public GlComponent
{
friend class GlWindow;
friend class GlStack;
size_t font_index;
@ -24,8 +27,13 @@ protected:
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);
std::shared_ptr<GlWindow> window, std::size_t window_index, std::shared_ptr<GlContainer> parent, std::size_t parent_index,
const position_t x, const position_t y, const std::string& text, const std::tuple<float, float, float, float>& text_color);
GlLabel(
std::shared_ptr<GlWindow> window, std::size_t window_index, const position_t x, const position_t y, const std::string& text,
const std::tuple<float, float, float, float>& text_color):
GlLabel(window, window_index, window, window_index, x, y, text, text_color)
{}
void render();
};