sandbox
Loading...
Searching...
No Matches
image.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_UI_IMAGE_HPP_
3#define LIBSBX_UI_IMAGE_HPP_
4
5#include <libsbx/graphics/images/image.hpp>
6
7#include <libsbx/ui/element.hpp>
8
9namespace sbx::ui {
10
11class image : public element {
12
13public:
14
15 using source_type = std::variant<graphics::image2d_handle, std::string>;
16
17 source_type source{};
18
19 image() = default;
20
21 ~image() override = default;
22
23protected:
24
25 auto submit(const math::vector2& screen_size) -> void override;
26
27}; // class image
28
29} // namespace sbx::ui
30
31#endif // LIBSBX_UI_IMAGE_HPP_
A vector in two-dimensional space.
Definition: vector2.hpp:28
Definition: element.hpp:22
Definition: image.hpp:11