-
Notifications
You must be signed in to change notification settings - Fork 225
/
settings.h
84 lines (69 loc) · 1.83 KB
/
settings.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
VitaShell
Copyright (C) 2015-2018, TheFloW
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __SETTINGS_H__
#define __SETTINGS_H__
#define MAX_THEMES 64
#define MAX_THEME_LENGTH 64
enum SettingsAgreement {
SETTINGS_AGREEMENT_NONE,
SETTINGS_AGREEMENT_AGREE,
SETTINGS_AGREEMENT_DISAGREE,
};
enum SettingsOptionType {
SETTINGS_OPTION_TYPE_BOOLEAN,
SETTINGS_OPTION_TYPE_INTEGER,
SETTINGS_OPTION_TYPE_STRING,
SETTINGS_OPTION_TYPE_CALLBACK,
SETTINGS_OPTION_TYPE_OPTIONS,
};
enum SettingsMenuStatus {
SETTINGS_MENU_CLOSED,
SETTINGS_MENU_CLOSING,
SETTINGS_MENU_OPENED,
SETTINGS_MENU_OPENING,
};
typedef struct {
int status;
float cur_pos;
int entry_sel;
int option_sel;
int n_options;
} SettingsMenu;
typedef struct {
int name;
int type;
int (* callback)();
char *string;
int size_string;
char **options;
int n_options;
int *value;
} SettingsMenuOption;
typedef struct {
int name;
SettingsMenuOption *options;
int n_options;
} SettingsMenuEntry;
void loadSettingsConfig();
void saveSettingsConfig();
void initSettingsMenu();
void openSettingsMenu();
void closeSettingsMenu();
int getSettingsMenuStatus();
void drawSettingsMenu();
void settingsMenuCtrl();
void settingsAgree();
void settingsDisagree();
#endif