forked from NaiJi/project-kyoku
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
693 B
C++
41 lines
693 B
C++
#include "group.h"
|
|
|
|
void Group::input(const sf::Event& event)
|
|
{
|
|
Widget::input(event);
|
|
}
|
|
|
|
void Group::update(const sf::Time& dt)
|
|
{
|
|
Widget::update(dt);
|
|
}
|
|
|
|
void Group::draw(sf::RenderTarget& target, sf::RenderStates states) const
|
|
{
|
|
Widget::draw(target, states);
|
|
}
|
|
|
|
void Group::setRect(const sf::FloatRect& rect)
|
|
{
|
|
_rect = rect;
|
|
}
|
|
|
|
void Group::setPosition(const sf::Vector2f& position)
|
|
{
|
|
_rect.top = position.y;
|
|
_rect.left = position.x;
|
|
}
|
|
|
|
void Group::move(const sf::Vector2f& delta)
|
|
{
|
|
_rect.top += delta.y;
|
|
_rect.left += delta.x;
|
|
|
|
Widget::move(delta);
|
|
}
|
|
|
|
bool Group::isUnderMouse(int mouse_x, int mouse_y) const
|
|
{
|
|
return _rect.contains(mouse_x, mouse_y);
|
|
}
|