1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2024-06-26 15:52:11 +02:00
SpaceCadetPinball/SpaceCadetPinball/options.h
Muzychenko Andrey c63c6701ac gdrv: RGBA buffers, pre-applied palettes, SDL bitmap origin.
Refactored partman.
Added sprite viewer.
2021-09-21 13:14:39 +03:00

53 lines
1.5 KiB
C++

#pragma once
#include <map>
struct optionsStruct
{
int Sounds;
int Music;
int FullScreen;
int Players;
int LeftFlipperKey;
int RightFlipperKey;
int PlungerKey;
int LeftTableBumpKey;
int RightTableBumpKey;
int BottomTableBumpKey;
int LeftFlipperKeyDft;
int RightFlipperKeyDft;
int PlungerKeyDft;
int LeftTableBumpKeyDft;
int RightTableBumpKeyDft;
int BottomTableBumpKeyDft;
int Resolution;
bool UniformScaling;
};
class options
{
public:
static optionsStruct Options;
static void init();
static void uninit();
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);
static void toggle(uint32_t uIDCheckItem);
static void update_resolution_menu();
static void init_resolution();
static void keyboard();
private:
static short vk_list[28];
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);
};