2015-05-16 19:06:38 +02:00
|
|
|
#ifndef CONFIG_H
|
|
|
|
|
|
|
|
#define CONFIG_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"{
|
|
|
|
#endif
|
|
|
|
|
2016-07-16 01:25:49 +02:00
|
|
|
#define CONFIG_FILE "\\\\fls0\\EIGEN.cfg"
|
2016-03-03 00:32:59 +01:00
|
|
|
|
2015-05-16 19:06:38 +02:00
|
|
|
typedef enum {
|
|
|
|
CHECK_BOX, FUNCTION_CALL,
|
|
|
|
} Menu_Item_Type;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char* str;
|
|
|
|
Menu_Item_Type type;
|
|
|
|
union { //The item can act on a variable or call a function
|
2016-03-03 00:32:59 +01:00
|
|
|
struct {
|
|
|
|
int* value;
|
|
|
|
void (*save_function)(void);
|
|
|
|
} val;
|
2015-05-16 19:06:38 +02:00
|
|
|
void (*function)(void);
|
|
|
|
} action;
|
|
|
|
} Menu_Item;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
Menu_Item** items;
|
|
|
|
int items_number;
|
|
|
|
} Menu;
|
|
|
|
|
|
|
|
|
|
|
|
void draw_menu(Menu* menu);
|
|
|
|
void menu_setup();
|
2015-05-31 14:17:43 +02:00
|
|
|
void menu_about();
|
2016-03-03 00:32:59 +01:00
|
|
|
Menu_Item* menu_create_item(const char* str, Menu_Item_Type type, void* other, void* save_func);
|
|
|
|
|
|
|
|
void save_config();
|
|
|
|
void load_config();
|
2015-05-16 19:06:38 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // CONFIG_H
|