Skip to content
Snippets Groups Projects
Commit fe8a002d authored by Susa Márk's avatar Susa Márk
Browse files

Upload New File

parent aca43196
No related branches found
No related tags found
No related merge requests found
#include "oswidget.hpp"
OSWidget::OSWidget(Window* window, int pos_x, int pos_y, int width, int height)
: _window(window), _pos_x(pos_x), _pos_y(pos_y), _width(width), _height(height) {}
bool OSWidget::is_selected(int mouse_x, int mouse_y) {
return (mouse_x >= _pos_x && mouse_x <= _pos_x + _width &&
mouse_y >= _pos_y && mouse_y <= _pos_y + _height);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment