Skip to content
Snippets Groups Projects
Commit 1ba0e23f authored by Borostyán József Bálint's avatar Borostyán József Bálint :flag_al:
Browse files

Upload New File

parent c6cd4b34
No related branches found
No related tags found
No related merge requests found
#include "widget.hpp"
Widget::Widget(int x_, int y_, int w_, int h_)
: x(x_), y(y_), width(w_), height(h_), selected(false) {}
bool Widget::is_selected(int mx, int my) const {
return mx >= x && mx <= x + width && my >= y && my <= y + height;
}
void Widget::set_focus(bool f) {
selected = f;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment