Esempio n. 1
0
bool widget::is_at(const point& coordinate, const bool must_be_active) const
{
	if(!recursive_is_visible(this, must_be_active)) {
		return false;
	}

	return sdl::point_in_rect(coordinate, get_rectangle());
}
Esempio n. 2
0
bool twidget::is_at(const tpoint& coordinate, const bool must_be_active) const
{
    if(!recursive_is_visible(this, must_be_active)) {
        return false;
    }

    return coordinate.x >= x_ && coordinate.x < (x_ + static_cast<int>(width_))
           && coordinate.y >= y_
           && coordinate.y < (y_ + static_cast<int>(height_));
}