Added UI functionality to the Graphics System #232

Merged
Xenosas1337 merged 40 commits from UI_Integration into main 2022-11-20 15:43:34 +08:00
2 changed files with 15 additions and 1 deletions
Showing only changes of commit 786e15771c - Show all commits

View File

@ -67,8 +67,9 @@ constexpr std::string_view ASSET_ROOT {"../../Assets"};
constexpr std::string_view BUILT_IN_ASSET_ROOT{ "../../Built_In" };
#endif
// COMPILER PATHS
// COMPILER EXE
constexpr std::string_view MODEL_COMPILER_EXE{ "ModelCompiler.exe" };
constexpr std::string_view FONT_COMPILER_EXE{ "FontCompiler.exe" };
// INTERNAL ASSET PATHS
constexpr std::string_view SCENE_FOLDER{ "/Scenes/" };

View File

@ -20,6 +20,7 @@
#include "Libraries/Loaders/SHTextureLoader.h"
#include "Libraries/Loaders/SHShaderSourceLoader.h"
#include "Libraries/Loaders/SHTextBasedLoader.h"
#include "Libraries/Loaders/SHFontLoader.h"
//#include "Libraries/Compilers/SHMeshCompiler.h"
#include "Libraries/Compilers/SHTextureCompiler.h"
@ -398,6 +399,16 @@ namespace SHADE
}
newPath = pathGen.value();
}
else if (ext == TTF_EXTENSION.data())
{
std::string command = FONT_COMPILER_EXE.data();
command += " " + path.string();
std::system(command.c_str());
std::string fontPath = path.string().substr(0, path.string().find_last_of('.'));
fontPath += FONT_EXTENSION;
newPath = fontPath;
}
else
{
SHLOG_WARNING("File Type compilation not yet Implemented: {}", path.string());
@ -450,6 +461,8 @@ namespace SHADE
loaders[static_cast<size_t>(AssetType::PREFAB)] = loaders[static_cast<size_t>(AssetType::SCENE)];
loaders[static_cast<size_t>(AssetType::MATERIAL)] = loaders[static_cast<size_t>(AssetType::SCENE)];
loaders[static_cast<size_t>(AssetType::MESH)] = nullptr;
loaders[static_cast<size_t>(AssetType::SCRIPT)] = nullptr;
loaders[static_cast<size_t>(AssetType::FONT)] = dynamic_cast<SHAssetLoader*>(new SHFontLoader());
}
/****************************************************************************