mirror of
https://github.com/SunsetMkt/Akebi-GC.git
synced 2025-09-19 12:06:04 +08:00
fix: teleports
and imgui.ini
located in game folder
This commit is contained in:
@ -202,6 +202,9 @@ namespace renderer
|
||||
|
||||
ImGui_ImplDX12_CreateDeviceObjects();
|
||||
ImGui::GetIO().ImeWindowHandle = window;
|
||||
|
||||
static const std::string imguiPath = (util::GetCurrentPath() / "imgui.ini").string();
|
||||
ImGui::GetIO().IniFilename = imguiPath.c_str();
|
||||
io.SetPlatformImeDataFn = nullptr; // F**king bug take 4 hours of my life
|
||||
}
|
||||
|
||||
@ -213,6 +216,8 @@ namespace renderer
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||
static const std::string imguiPath = (util::GetCurrentPath() / "imgui.ini").string();
|
||||
io.IniFilename = imguiPath.c_str();
|
||||
|
||||
LoadCustomFont();
|
||||
SetupImGuiStyle();
|
||||
|
@ -70,6 +70,17 @@ namespace util
|
||||
return std::filesystem::path(pathOut).parent_path().string();
|
||||
}
|
||||
|
||||
static std::filesystem::path _currentPath;
|
||||
void SetCurrentPath(const std::filesystem::path& current_path)
|
||||
{
|
||||
_currentPath = current_path;
|
||||
}
|
||||
|
||||
std::filesystem::path GetCurrentPath()
|
||||
{
|
||||
return _currentPath;
|
||||
}
|
||||
|
||||
std::optional<std::string> SelectDirectory(const char* title)
|
||||
{
|
||||
auto currPath = std::filesystem::current_path();
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <vector>
|
||||
#include <cheat-base/Logger.h>
|
||||
|
||||
#include <filesystem>
|
||||
#include <SimpleIni.h>
|
||||
|
||||
|
||||
@ -38,6 +39,9 @@ namespace util
|
||||
|
||||
std::string GetModulePath(HMODULE hModule = nullptr);
|
||||
|
||||
void SetCurrentPath(const std::filesystem::path& curren_path);
|
||||
std::filesystem::path GetCurrentPath();
|
||||
|
||||
std::vector<std::string> StringSplit(const std::string& delimiter, const std::string& content);
|
||||
std::string SplitWords(const std::string& value);
|
||||
std::string MakeCapital(std::string value);
|
||||
|
Reference in New Issue
Block a user