Skip to content
Snippets Groups Projects
Commit f0b19c1a authored by Horváth Ádám's avatar Horváth Ádám
Browse files

lehet végleges

parent 8a340091
Branches
No related tags found
No related merge requests found
#include "widgets.hpp"
#include "application.hpp"
using namespace genv;
Widget::Widget(Application * parent, int x, int y, int sx, int sy) : _parent(parent), _x(x), _y(y), _size_x(sx), _size_y(sy)
{
_parent->registerWidget(this);
}
bool Widget::is_selected(int mouse_x, int mouse_y)
{
return mouse_x > _x && mouse_x < _x + _size_x && mouse_y >_y && mouse_y < _y + _size_y;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment