#include "client/window/basic_window.hh" namespace client { namespace window { using bw = basic_window; bool bw::is_inside(const glm::vec2& v, const glm::vec2& p, const glm::vec2& s) noexcept { if (v.x < p.x || v.x > p.x + s.x) { return false; } if (v.y < p.y || v.y > p.y + s.y) { return false; } return true; } bool bw::is_inside(const glm::vec2& v) const noexcept { return is_inside(v, this->pos, this->size); } void bw::draw() noexcept { client::render::draw_rectangle({.pos = {.offset = this->pos + 6.0f}, .size = {.offset = this->size}, .colour = {this->tertiary_clr, 0.9f}}); client::render::draw_rectangle({.pos = {.offset = this->pos}, .size = {.offset = this->size}, .colour = {this->primary_clr, 1.0f}}); } } // namespace window } // namespace client