-
Notifications
You must be signed in to change notification settings - Fork 1
/
FindAllConfig.h
63 lines (53 loc) · 1.46 KB
/
FindAllConfig.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef __ASHITA_FindAllConfig_H_INCLUDED__
#define __ASHITA_FindAllConfig_H_INCLUDED__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
#define CONTAINER_MAX 17
#include "ConfigLoader.h"
enum class FindAllDisplayMode
{
ChatLog = 0,
ImGui = 1
};
struct FindAllSettings_t
{
bool CacheToDisc;
int32_t DisplayMax;
FindAllDisplayMode DisplayMode;
bool InstantLoad;
bool RequireKeyItemPrefix;
uint32_t WritePeriod;
FindAllSettings_t()
: CacheToDisc(true)
, DisplayMax(8)
, DisplayMode(FindAllDisplayMode::ImGui)
, InstantLoad(false)
, RequireKeyItemPrefix(true)
, WritePeriod(20000)
{}
};
class FindAllConfig : public ConfigBase
{
private:
FindAllSettings_t mSettings;
public:
FindAllConfig();
bool GetCacheToDisc();
int32_t GetDisplayMax();
FindAllDisplayMode GetDisplayMode();
bool GetInstantLoad();
bool GetKeyItemPrefix();
uint32_t GetWritePeriod();
void SetCacheToDisc(bool value);
void SetDisplayMax(int32_t value);
void SetDisplayMode(FindAllDisplayMode mode);
void SetInstantLoad(bool value);
void SetKeyItemPrefix(bool required);
void SetWritePeriod(uint32_t milliseconds);
ConfigSaveStyle GetDefaultSaveStyle() override;
bool LoadConfig(xml_node<>* pRoot, const char* errorBuffer) override;
void Reset() override;
bool SaveConfig(std::ofstream* pStream, const char* errorBuffer) override;
};
#endif