view include/core/config.h @ 74:5ccb99bfa605

fix regressions on macOS for now, we're setting our font sizes using setPixelSize, and later I'll use a macro or something to make the point size constant across platforms also anilist user id stuff stopped working :) that's fixed now
author Paper <mrpapersonic@gmail.com>
date Tue, 03 Oct 2023 06:12:43 -0400
parents 3d2decf093bb
children c69230dc2b5d
line wrap: on
line source

#ifndef __core__config_h
#define __core__config_h
#include "core/anime.h"

enum class Themes {
	LIGHT,
	DARK,
	OS // AKA "Default"
};

class Config {
	public:
		int Load();
		int Save();

		Anime::Services service;
		Themes theme;

		struct {
			public:
				Anime::TitleLanguage language;
				bool display_aired_episodes;
				bool display_available_episodes;
				bool highlight_anime_if_available;
				bool highlighted_anime_above_others;
		} anime_list;

		struct {
			public:
				std::string auth_token;
				std::string username;
				int user_id;
		} anilist;
};

#define WIDEIFY_EX(x) L##x
#define WIDEIFY(x)    WIDEIFY_EX(x)
#define CONFIG_DIR    "minori"
#define CONFIG_WDIR   WIDEIFY(CONFIG_DIR)
#define CONFIG_NAME   "config.json"
#define CONFIG_WNAME  WIDEIFY(CONFIG_NAME)

#define MAX_LINE_LENGTH 256
#endif // __core__config_h