mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
hud refactor (part II)
This commit is contained in:
parent
8118afce5c
commit
e493c67dfa
13 changed files with 142 additions and 91 deletions
33
src/frontend/LevelFrontend.cpp
Normal file
33
src/frontend/LevelFrontend.cpp
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#include "LevelFrontend.h"
|
||||
|
||||
#include "../world/Level.h"
|
||||
#include "../assets/Assets.h"
|
||||
#include "BlocksPreview.h"
|
||||
#include "ContentGfxCache.h"
|
||||
|
||||
LevelFrontend::LevelFrontend(Level* level, Assets* assets)
|
||||
: level(level),
|
||||
assets(assets),
|
||||
contentCache(std::make_unique<ContentGfxCache>(level->content, assets)),
|
||||
blocksPreview(std::make_unique<BlocksPreview>(assets, contentCache.get())) {
|
||||
|
||||
}
|
||||
|
||||
LevelFrontend::~LevelFrontend() {
|
||||
}
|
||||
|
||||
Level* LevelFrontend::getLevel() const {
|
||||
return level;
|
||||
}
|
||||
|
||||
Assets* LevelFrontend::getAssets() const {
|
||||
return assets;
|
||||
}
|
||||
|
||||
BlocksPreview* LevelFrontend::getBlocksPreview() const {
|
||||
return blocksPreview.get();
|
||||
}
|
||||
|
||||
ContentGfxCache* LevelFrontend::getContentGfxCache() const {
|
||||
return contentCache.get();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue