refactor: add ContentControl class

This commit is contained in:
MihailRis
2025-04-02 15:01:24 +03:00
parent 7262119f5b
commit 331734792d
21 changed files with 324 additions and 246 deletions
+3 -7
View File
@@ -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;
}