Smolgui
Immediate gui library based on SFML
Loading...
Searching...
No Matches
LoadTextureAtlas.h
Go to the documentation of this file.
1#pragma once
2
3#include <nlohmann/json.hpp>
6
7// for readability
8using json = nlohmann::json;
9
10namespace sgui
11{
16
20bool loadFromFile (TextureAtlas& atlas, const std::string& file);
21void saveInFile (const TextureAtlas& atlas, const std::string& file, const bool compact = false);
22
23} // namespace sgui
nlohmann::json json
Definition LoadJson.h:8
Contains texture position and sub-box of all sprites for a given sprite sheet. Animations ca be handl...
Definition TextureAtlas.h:28
Definition Interpolation.h:16
void saveInFile(const json &out, const std::string &file, const bool compact)
save json to file
Definition LoadJson.cpp:6
json loadFromFile(const std::string &file)
load json from file
Definition LoadJson.cpp:21
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Frames, count, texture)
Store frames count and textures to ease serialization and for better interface.
Definition TextureAtlas.h:14