From 5791c1962e682120064d2f362870ce31be905e82 Mon Sep 17 00:00:00 2001 From: daobashun <49193927+fangshun2004@users.noreply.github.com> Date: Sat, 12 Apr 2025 08:31:15 +0800 Subject: [PATCH] Fix read packed int not working (#128) * Fix read packed int not working Remove the scope setting packed int (because accidentally setting packed int in bulk will cause account failures and there is no need to set it in bulk) Do not generate some configuration files at the root of the game * In VS, the views are sorted by folder * quash * Change the path * Reset the window style --- src/game/frontend/Menu.cpp | 11 ++++++++--- src/game/frontend/submenus/Recovery/StatEditor.cpp | 4 +--- 2 files changed, 9 insertions(+), 6 deletions(-) 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); } }