8#include <aegis2d/render/export.hpp>
24 static constexpr float smallest = 1.0F;
26 static constexpr float largest = 2.0F;
28 static constexpr float step = 0.25F;
35 [[nodiscard]]
float scale() const noexcept;
39 [[nodiscard]]
int percent() const noexcept;
42 void larger() noexcept;
45 void smaller() noexcept;
55 void save(core::Config& settings,
std::string_view path) const;
62 void load(const core::Config& settings,
std::string_view path);
69[[nodiscard]] AEGIS2D_RENDER_EXPORT
bool overlaps(const
Rect& first, const
Rect& second) noexcept;
75[[nodiscard]] AEGIS2D_RENDER_EXPORT
bool contains(const
Rect& outer, const
Rect& inner) noexcept;
Text drawn with a bitmap font, through the sprite batcher.
JSON configuration with dotted-path lookups, which can be changed and saved.
Vector and matrix types of the engine (GLM behind engine names).
OpenGL renderer: sprites, text and camera (client only).
Definition bitmap_font.hpp:16
aegis2d::Vec2 Vec2
2D vector of floats, in logical pixels: the engine-wide aegis2d::Vec2.
Definition renderer.hpp:17
FlowLayout flow_layout(std::span< const Vec2 > sizes, const Rect &area, Vec2 gap)
Places boxes left to right in an area, starting a new row when one does not fit.
Definition endpoint.hpp:85
Backend-independent renderer interface and the sprite it draws.
Boxes placed by flow_layout().
Definition text_layout.hpp:78
Vec2 size
Width of the widest row and height of all rows.
Definition text_layout.hpp:82
std::vector< Vec2 > positions
Top-left corner of each box, in the order of the sizes given.
Definition text_layout.hpp:80
Axis-aligned rectangle.
Definition renderer.hpp:20
Size of the HUD and menu text chosen by the player, from 100% to 200%.
Definition text_layout.hpp:22
float scale() const noexcept
The factor, brought into [smallest, largest]; not-a-number gives 1.
How a text is drawn.
Definition bitmap_font.hpp:49