mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
'ImGuiConfig::Load()' was loading from the new path, however 'ImGuiConfig::Save()' was not. Defined path as constant expression to avoid this problem in the future. Also loading the files through the engine's API from now on.
42 lines
790 B
C++
42 lines
790 B
C++
#pragma once
|
|
|
|
constexpr char IMGUI_BIND_PATH[] = "cfg/imgui/";
|
|
constexpr char IMGUI_BIND_FILE[] = "bind.json";
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// Internals
|
|
int Stricmp(const char* s1, const char* s2);
|
|
int Strnicmp(const char* s1, const char* s2, int n);
|
|
char* Strdup(const char* s);
|
|
void Strtrim(char* s);
|
|
|
|
enum class ImGuiStyle_t
|
|
{
|
|
NONE = -1,
|
|
DEFAULT,
|
|
LEGACY,
|
|
MODERN
|
|
};
|
|
|
|
class ImGuiConfig
|
|
{
|
|
public:
|
|
struct
|
|
{
|
|
int m_nBind0 = VK_OEM_3;
|
|
int m_nBind1 = VK_INSERT;
|
|
} m_ConsoleConfig;
|
|
|
|
struct
|
|
{
|
|
int m_nBind0 = VK_HOME;
|
|
int m_nBind1 = VK_F10;
|
|
} m_BrowserConfig;
|
|
|
|
void Load();
|
|
void Save();
|
|
ImGuiStyle_t InitStyle() const;
|
|
};
|
|
|
|
extern ImGuiConfig* g_pImGuiConfig;
|