class
#include <ldtk_project.h>
project
Public functions
- auto get_level(gen::level_ident identifier) const -> const level& constexpr
- Looks up a level with its identifier.
- auto find_level(gen::level_iid iid) const -> const level& constexpr
- Linear searches a level with its Instance id.
- auto defs() const -> const definitions& constexpr
- A structure containing all the definitions of this project.
- auto iid() const -> gen::project_iid constexpr
- Unique project identifier.
- auto levels() const -> const bn::span<const level>& constexpr
- All levels. The order of this array is only relevant in
linear_horizontal
andlinear_vertical
world layouts (seeworldLayout
value).
Otherwise, you should refer to theworld_x
,world_y
coordinates of each Level. - auto bg_color() const -> bn::color constexpr
- Project background color.
- auto opacity() const -> bn::fixed constexpr
- Global opacity used for semi-transparent layers.
Function documentation
const level& ldtk:: project:: find_level(gen::level_iid iid) const constexpr
Linear searches a level with its Instance id.
Parameters | |
---|---|
iid | Instance id of the level to search for. |
Returns | Reference to the found level. |