1 #ifndef BLOBS_UI_WIDGET_HPP_
2 #define BLOBS_UI_WIDGET_HPP_
4 #include "../graphics/glm.hpp"
22 Widget(const Widget &) = delete;
23 Widget &operator =(const Widget &) = delete;
25 Widget(Widget &&) = delete;
26 Widget &operator =(Widget &&) = delete;
29 Widget *Position(const glm::vec2 &p) noexcept { pos = p; return this; }
30 const glm::vec2 &Position() const noexcept { return pos; }
32 Widget *ZIndex(float z) noexcept { z_index = z; return this; }
33 float ZIndex() const noexcept { return z_index; }
35 virtual glm::vec2 Size() = 0;
36 virtual void Draw(app::Assets &, graphics::Viewport &) noexcept = 0;