2020-11-05 16:44:34 +01:00
|
|
|
#pragma once
|
2021-09-21 12:14:39 +02:00
|
|
|
#include <map>
|
2020-11-06 14:56:32 +01:00
|
|
|
|
2021-01-29 14:42:05 +01:00
|
|
|
struct optionsStruct
|
2020-11-06 14:56:32 +01:00
|
|
|
{
|
|
|
|
int Sounds;
|
|
|
|
int Music;
|
|
|
|
int FullScreen;
|
|
|
|
int Players;
|
|
|
|
int LeftFlipperKey;
|
|
|
|
int RightFlipperKey;
|
|
|
|
int PlungerKey;
|
|
|
|
int LeftTableBumpKey;
|
|
|
|
int RightTableBumpKey;
|
|
|
|
int BottomTableBumpKey;
|
2020-12-13 14:05:19 +01:00
|
|
|
int LeftFlipperKeyDft;
|
|
|
|
int RightFlipperKeyDft;
|
|
|
|
int PlungerKeyDft;
|
|
|
|
int LeftTableBumpKeyDft;
|
|
|
|
int RightTableBumpKeyDft;
|
|
|
|
int BottomTableBumpKeyDft;
|
2021-02-06 14:53:47 +01:00
|
|
|
int Resolution;
|
2021-02-09 16:09:44 +01:00
|
|
|
bool UniformScaling;
|
2020-11-06 14:56:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2020-11-05 16:44:34 +01:00
|
|
|
class options
|
|
|
|
{
|
|
|
|
public:
|
2021-09-16 09:57:46 +02:00
|
|
|
static optionsStruct Options;
|
|
|
|
|
2021-09-06 15:27:58 +02:00
|
|
|
static void init();
|
2020-12-04 16:35:47 +01:00
|
|
|
static void uninit();
|
2021-09-16 09:57:46 +02:00
|
|
|
static int get_int(LPCSTR lpValueName, int defaultValue);
|
|
|
|
static void set_int(LPCSTR lpValueName, int data);
|
|
|
|
static std::string get_string(LPCSTR lpValueName, LPCSTR defaultValue);
|
|
|
|
static void set_string(LPCSTR lpValueName, LPCSTR value);
|
2021-09-06 15:27:58 +02:00
|
|
|
static void toggle(uint32_t uIDCheckItem);
|
2021-02-06 14:53:47 +01:00
|
|
|
static void update_resolution_menu();
|
|
|
|
static void init_resolution();
|
2020-12-13 14:05:19 +01:00
|
|
|
|
2020-12-02 18:12:34 +01:00
|
|
|
static void keyboard();
|
2020-11-05 16:44:34 +01:00
|
|
|
private:
|
2020-12-13 14:05:19 +01:00
|
|
|
static short vk_list[28];
|
2021-09-16 09:57:46 +02:00
|
|
|
static std::map<std::string, std::string> settings;
|
|
|
|
|
|
|
|
static void MyUserData_ReadLine(ImGuiContext* ctx, ImGuiSettingsHandler* handler, void* entry, const char* line);
|
|
|
|
static void* MyUserData_ReadOpen(ImGuiContext* ctx, ImGuiSettingsHandler* handler, const char* name);
|
|
|
|
static void MyUserData_WriteAll(ImGuiContext* ctx, ImGuiSettingsHandler* handler, ImGuiTextBuffer* buf);
|
|
|
|
static const std::string& GetSetting(const std::string& key, const std::string& value);
|
|
|
|
static void SetSetting(const std::string& key, const std::string& value);
|
2020-11-05 16:44:34 +01:00
|
|
|
};
|