mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
UiDocument is an asset now
This commit is contained in:
parent
241d15e349
commit
07adbd04ea
21 changed files with 402 additions and 304 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "../graphics/Shader.h"
|
||||
#include "../graphics/Atlas.h"
|
||||
#include "../graphics/Font.h"
|
||||
#include "../frontend/UiDocument.h"
|
||||
|
||||
Assets::~Assets() {
|
||||
}
|
||||
|
|
@ -62,6 +63,17 @@ void Assets::store(const TextureAnimation& animation) {
|
|||
animations.emplace_back(animation);
|
||||
}
|
||||
|
||||
UiDocument* Assets::getLayout(std::string name) const {
|
||||
auto found = layouts.find(name);
|
||||
if (found == layouts.end())
|
||||
return nullptr;
|
||||
return found->second.get();
|
||||
}
|
||||
|
||||
void Assets::store(UiDocument* layout, std::string name) {
|
||||
layouts[name].reset(layout);
|
||||
}
|
||||
|
||||
void Assets::extend(const Assets& assets) {
|
||||
for (auto entry : assets.textures) {
|
||||
textures[entry.first] = entry.second;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue