diff --git a/src/game/frontend/Menu.cpp b/src/game/frontend/Menu.cpp index dd92b60..8d71c83 100644 --- a/src/game/frontend/Menu.cpp +++ b/src/game/frontend/Menu.cpp @@ -1,5 +1,6 @@ #include "Menu.hpp" - +#include "imgui.h" +#include "imgui_internal.h" #include "core/commands/Commands.hpp" #include "core/frontend/manager/UIManager.hpp" #include "core/renderer/Renderer.hpp" @@ -15,7 +16,7 @@ #include "submenus/Settings.hpp" #include "submenus/Debug.hpp" #include "submenus/World.hpp" - +#include "core/filemgr/FileMgr.hpp" namespace YimMenu { void Menu::Init() @@ -110,7 +111,11 @@ namespace YimMenu void Menu::SetupFonts() { - auto& IO = ImGui::GetIO(); + auto& IO = ImGui::GetIO(); + auto file_path = std::filesystem::path(std::getenv("appdata")) / "YimMenuV2" / "imgui.ini"; + std::string path = file_path.string(); + IO.IniFilename = path.c_str(); + IO.LogFilename = NULL; ImFontConfig FontCfg{}; FontCfg.FontDataOwnedByAtlas = false; diff --git a/src/game/frontend/submenus/Recovery/StatEditor.cpp b/src/game/frontend/submenus/Recovery/StatEditor.cpp index 0435f55..3f3089f 100644 --- a/src/game/frontend/submenus/Recovery/StatEditor.cpp +++ b/src/game/frontend/submenus/Recovery/StatEditor.cpp @@ -203,7 +203,7 @@ namespace YimMenu::Submenus if (info.m_IsBoolStat) value.m_AsBool = STATS::GET_PACKED_STAT_BOOL_CODE(info.m_Index, -1); else - value.m_AsInt = STATS::GET_PACKED_STAT_BOOL_CODE(info.m_Index, -1); + value.m_AsInt = STATS::GET_PACKED_STAT_INT_CODE(info.m_Index, -1); } static void WritePackedStat(const StatValue& value, const PackedStatInfo& info) @@ -224,8 +224,6 @@ namespace YimMenu::Submenus if (info.m_IsBoolStat) STATS::SET_PACKED_STAT_BOOL_CODE(info.m_Index, static_cast(value), -1); - else - STATS::SET_PACKED_STAT_INT_CODE(info.m_Index, value, -1); } }