#include <Widget/IconLabel/IconLabel.hpp>

IconLabel::IconLabel(Material &icon) : icon(icon) {}

void IconLabel::draw(GraphicsContext &context)
{
    context.color = color;
    context.drawMaterial(icon, 0, 0);
}

glm::ivec2 IconLabel::getMinSize()
{
    return glm::ivec2(icon.width(), icon.height());
}

IconLabel* IconLabel::withColor(glm::vec4 color)
{
    this->color = color;
    return this;
}