#include <Widget/AnimationView/AnimationView.hpp>

AnimationView::AnimationView(Animation &animation) : animation(animation) {}

void AnimationView::draw(GraphicsContext &context)
{
    context.color = glm::vec4(1.0f);
    context.drawMaterial(animation.getCurrentFrame(), 0, 0);
}

glm::ivec2 AnimationView::getMinSize()
{
    return glm::ivec2(animation.getCurrentFrame().width(), animation.getCurrentFrame().height());
}