Files
vimix/Settings.h
2020-04-27 23:50:54 +02:00

60 lines
1005 B
C++

#ifndef __SETTINGS_H_
#define __SETTINGS_H_
#include "defines.h"
#include <string>
#include <list>
namespace Settings {
struct Window
{
std::string name;
int x,y,w,h;
bool fullscreen;
Window() : name(APP_TITLE), x(15), y(15), w(1280), h(720), fullscreen(false) { }
};
struct Application
{
// Verification
std::string name;
// Global settings Application interface
float scale;
int accent_color;
bool preview;
bool media_player;
bool shader_editor;
// multiple windows handling
std::list<Window> windows;
Application() : name(APP_NAME){
scale = 1.f;
accent_color = 0;
preview = true;
media_player = false;
shader_editor = false;
windows.push_back(Window());
}
};
// minimal implementation of settings
// Can be accessed r&w anywhere
extern Application application;
// Save and Load store settings in XML file
void Save();
void Load();
void Check();
}
#endif /* __SETTINGS_H_ */