Cleaned up logging window

This commit is contained in:
Antoine Pilote
2024-07-23 18:36:15 -04:00
parent a350df5c54
commit fbc4ee1900
3 changed files with 16 additions and 11 deletions

View File

@@ -66,15 +66,15 @@ namespace Nuake {
EditorInterface::EditorInterface(CommandBuffer& commandBuffer) :
mCommandBuffer(&commandBuffer)
{
Logger::Log("Creating editor windows", "window", CRITICAL);
Logger::Log("Creating editor windows", "window", VERBOSE);
filesystem = new FileSystemUI(this);
_WelcomeWindow = new WelcomeWindow(this);
_audioWindow = new AudioWindow();
Logger::Log("Building fonts", "window", CRITICAL);
Logger::Log("Building fonts", "window", VERBOSE);
BuildFonts();
Logger::Log("Loading imgui from mem", "window", CRITICAL);
Logger::Log("Loading imgui from mem", "window", VERBOSE);
using namespace Nuake::StaticResources;
ImGui::LoadIniSettingsFromMemory((const char*)StaticResources::Resources_default_layout_ini);
}
@@ -1990,7 +1990,12 @@ namespace Nuake {
ImGui::PushStyleColor(ImGuiCol_Text, color);
ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, ImGui::GetColorU32(ImVec4(1, 1, 1, 0.0)), -1);
std::string displayMessage = l.message + "(" + std::to_string(l.count) + ")";
std::string displayMessage = l.message;
if (l.count > 0)
{
displayMessage + "(" + std::to_string(l.count) + ")";
}
ImGui::TextWrapped(displayMessage.c_str());
ImGui::PopStyleColor();
@@ -2527,10 +2532,10 @@ namespace Nuake {
auto project = Project::New();
auto projectFileData = FileSystem::ReadFile(projectPath, true);
Logger::Log("Reading file project: " + projectFileData, "window", CRITICAL);
Logger::Log("Reading file project: " + projectFileData, "window", VERBOSE);
try
{
Logger::Log("Starting deserializing", "window", CRITICAL);
Logger::Log("Starting deserializing", "window", VERBOSE);
project->Deserialize(json::parse(projectFileData));
project->FullPath = projectPath;

View File

@@ -35,7 +35,7 @@ namespace Nuake {
std::vector<Vector3> vertices;
std::vector<int> indices;
// Since we are merging all the meshes togheter, we need to offset
// Since we are merging all the meshes together, we need to offset
// the indices so they point to the correct vertices in the array.
// Example: Model1 + Model2 + Model3 will get merged together in one array
// and we need to make sure the indices of Model2 point to the correct location in the merged array
@@ -283,8 +283,8 @@ namespace Nuake {
return;
}
duDebugDrawNavMeshBVTree(&m_DebugDrawer, *m_DetourNavMesh);
duDebugDrawNavMeshNodes(&m_DebugDrawer, *m_DetourNavQuery);
//duDebugDrawNavMeshBVTree(&m_DebugDrawer, *m_DetourNavMesh);
//duDebugDrawNavMeshNodes(&m_DebugDrawer, *m_DetourNavQuery);
duDebugDrawNavMesh(&m_DebugDrawer, *m_DetourNavMesh, DU_DRAWNAVMESH_OFFMESHCONS);
if (Engine::GetCurrentScene()->EntityExists("test"))

View File

@@ -105,7 +105,7 @@ namespace Nuake
bool Project::Deserialize(const json& j)
{
Logger::Log("Starting deserializing project", "window", CRITICAL);
Logger::Log("Starting deserializing project", "window", VERBOSE);
if (!j.contains("Name") || !j.contains("Description"))
return false;
@@ -138,7 +138,7 @@ namespace Nuake
if (!FileSystem::FileExists(scenePath))
return true;
Logger::Log("Starting deserializing scene", "window", CRITICAL);
Logger::Log("Starting deserializing scene", "window", VERBOSE);
std::string sceneContent = FileSystem::ReadFile(scenePath, false);
if (!DefaultScene->Deserialize(nlohmann::json::parse(sceneContent)))
{