#include "group.h"

void Group::input(const kku::SystemEvent& event)
{
    Widget::input(event);
}

void Group::update(const kku::microsec& dt)
{
    Widget::update(dt);
}

void Group::display() const
{
    Widget::display();
}

void Group::setRect(const kku::Area<float>& rect)
{
    _rect = rect;
}

void Group::setPosition(const kku::Point& position)
{
    _rect.top = position.y;
    _rect.left = position.x;
}

void Group::move(const kku::Vector2<float>& delta)
{
    _rect.top += delta.first;
    _rect.left += delta.second;

    Widget::move(delta);
}

bool Group::isUnderMouse(const kku::Point& position) const
{
   return _rect.contains(position);
}

kku::Area<float> Group::getRect() const
{
    return _rect;
}

kku::Point Group::getPosition() const
{
    return kku::Point
    {
        _rect.top,
        _rect.left
    };
}

