#include <Widget/IconLabel/IconLabel.hpp>
#include <Widget/Label/Label.hpp>
#include <Widget/Layout/Center/Center.hpp>
#include <Widget/Layout/CompoundWidget/Deck/Deck.hpp>
#include <Widget/Layout/CompoundWidget/IconText/IconText.hpp>
#include <Widget/Layout/Row/Row.hpp>
#include <Widget/Panel/Panel.hpp>

IconText::IconText(Material &icon, const std::string &text)
{
    addChildren(
        new Deck<Row, Center>(
            new IconLabel(icon),
            new Panel(glm::ivec2(1, 0)),
            new Label(text)
        )
    );
}