diff --git a/include/engine/graphics/gui.hpp b/include/engine/graphics/gui.hpp index 6baacd37..a94c7d1d 100644 --- a/include/engine/graphics/gui.hpp +++ b/include/engine/graphics/gui.hpp @@ -29,7 +29,6 @@ namespace Graphics static inline bool firstScrollToBottom; static inline bool allowScrollToBottom; - static inline bool showAboutMenu; static inline bool showKeybindsMenu; static inline bool showDebugMenu; static inline bool showConsole; diff --git a/src/engine/core/console.cpp b/src/engine/core/console.cpp index 3ede56e1..a108e9de 100644 --- a/src/engine/core/console.cpp +++ b/src/engine/core/console.cpp @@ -67,7 +67,7 @@ namespace Core { std::vector ConsoleManager::storedLogs; - Logger logger(Search::FindDocumentsFolder() + "/" + "engine_log.txt"); + Logger logger(Search::FindDocumentsFolder() + "/engine_log.txt"); string Timestamp::GetCurrentTimestamp() { diff --git a/src/engine/file/configFile.cpp b/src/engine/file/configFile.cpp index 954c2b29..90915b71 100644 --- a/src/engine/file/configFile.cpp +++ b/src/engine/file/configFile.cpp @@ -65,7 +65,6 @@ namespace File //Render::camera.SetCameraRotation(vec3(-90.0f, 0.0f, 0.0f)); //editing this has no effect because camera is initialized later GUI::allowScrollToBottom = true; ConsoleManager::sendDebugMessages = true; - GUI::showAboutMenu = false; GUI::showKeybindsMenu = false; GUI::showDebugMenu = false; GUI::showConsole = false; @@ -370,27 +369,6 @@ namespace File "Console force scroll value " + lineVariables[0] + " is out of range or not an int! Resetting to default.\n"); } } - else if (name == "showAboutMenu") - { - if (ConfigFile::IsValueInRange(name, lineVariables[0])) - { - GUI::showAboutMenu = static_cast(stoi(lineVariables[0])); - - ConsoleManager::WriteConsoleMessage( - Caller::ENGINE, - Type::DEBUG, - "Set show about menu to " + to_string(GUI::showAboutMenu) + ".\n"); - } - else - { - GUI::showAboutMenu = false; - - ConsoleManager::WriteConsoleMessage( - Caller::ENGINE, - Type::EXCEPTION, - "Show about menu value " + lineVariables[0] + " is out of range or not an int! Resetting to default.\n"); - } - } else if (name == "showKeybindsMenu") { if (ConfigFile::IsValueInRange(name, lineVariables[0])) @@ -511,7 +489,6 @@ namespace File Render::camera.GetCameraRotation().z << endl; configFile << "consoleForceScroll: " << GUI::allowScrollToBottom << endl; configFile << "consoleDebugMessages: " << ConsoleManager::sendDebugMessages << endl; - configFile << "showAboutMenu: " << GUI::showAboutMenu << endl; configFile << "showKeybindsMenu: " << GUI::showKeybindsMenu << endl; configFile << "showDebugMenu: " << GUI::showDebugMenu << endl; configFile << "showConsole: " << GUI::showConsole << endl; @@ -602,13 +579,6 @@ namespace File && (consoleForceScroll == 0 || consoleForceScroll == 1)); } - else if (type == "showAboutMenu") - { - int showAboutMenu = stoi(value); - return (String::CanConvertStringToInt(value) - && (showAboutMenu == 0 - || showAboutMenu == 1)); - } else if (type == "showKeybindsMenu") { int showKeybindsMenu = stoi(value); diff --git a/src/engine/graphics/gui.cpp b/src/engine/graphics/gui.cpp index ffb59ef2..ab5e8223 100644 --- a/src/engine/graphics/gui.cpp +++ b/src/engine/graphics/gui.cpp @@ -84,11 +84,8 @@ namespace Graphics ImGui_ImplGlfw_InitForOpenGL(Render::window, true); ImGui_ImplOpenGL3_Init("#version 330"); - //clear default font io.Fonts->Clear(); - - string filesPath = Search::SearchByParent("files"); - io.Fonts->AddFontFromFileTTF((filesPath + "/fonts/coda/Coda-Regular.ttf").c_str(), 16.0f); + io.Fonts->AddFontFromFileTTF((Engine::filesPath + "/fonts/coda/Coda-Regular.ttf").c_str(), 16.0f); CustomizeImGuiStyle(); } @@ -303,7 +300,7 @@ namespace Graphics void GUI::TB_CheckVersion() { - string batFilePath = Engine::filesPath + "/files/bat scripts/checkVersion.bat"; + string batFilePath = Engine::filesPath + "/bat scripts/checkVersion.bat"; if (exists(batFilePath)) { @@ -381,7 +378,7 @@ namespace Graphics && ImGui::Begin("Keybinds", NULL, windowFlags)) { ImGui::SameLine(); - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 30); + ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 40); if (ImGui::Button("X")) { showKeybindsMenu = false; @@ -419,6 +416,13 @@ namespace Graphics if (showDebugMenu && ImGui::Begin("Debug menu", NULL, windowFlags)) { + ImGui::SameLine(); + ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 40); + if (ImGui::Button("X")) + { + showDebugMenu = false; + } + if (ImGui::BeginTabBar("Debug")) { if (ImGui::BeginTabItem("Debug info")) @@ -434,13 +438,6 @@ namespace Graphics ImGui::EndTabBar(); } - ImGui::SameLine(); - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 25); - if (ImGui::Button("X")) - { - showDebugMenu = false; - } - ImGui::End(); } } @@ -574,7 +571,7 @@ namespace Graphics && ImGui::Begin("Version", NULL, windowFlags)) { ImGui::SameLine(); - ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 30); + ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 40); if (ImGui::Button("X")) { showVersionWindow = false;