mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
refactor: add ContentControl class
This commit is contained in:
parent
7262119f5b
commit
331734792d
21 changed files with 324 additions and 246 deletions
|
|
@ -247,8 +247,8 @@ std::tuple<std::string, std::string> EnginePaths::parsePath(std::string_view pat
|
|||
return {prefix, filename};
|
||||
}
|
||||
|
||||
ResPaths::ResPaths(io::path mainRoot, std::vector<PathsRoot> roots)
|
||||
: mainRoot(std::move(mainRoot)), roots(std::move(roots)) {
|
||||
ResPaths::ResPaths(std::vector<PathsRoot> roots)
|
||||
: roots(std::move(roots)) {
|
||||
}
|
||||
|
||||
io::path ResPaths::find(const std::string& filename) const {
|
||||
|
|
@ -259,7 +259,7 @@ io::path ResPaths::find(const std::string& filename) const {
|
|||
return file;
|
||||
}
|
||||
}
|
||||
return mainRoot / filename;
|
||||
return io::path("res:") / filename;
|
||||
}
|
||||
|
||||
std::string ResPaths::findRaw(const std::string& filename) const {
|
||||
|
|
@ -356,7 +356,3 @@ std::vector<io::path> ResPaths::collectRoots() {
|
|||
}
|
||||
return collected;
|
||||
}
|
||||
|
||||
const io::path& ResPaths::getMainRoot() const {
|
||||
return mainRoot;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue