#pragma once #include #include #include #include #include namespace guecs { using std::string; struct Theme { sf::Color BLACK{0, 0, 0}; sf::Color DARK_DARK{10, 10, 10}; sf::Color DARK_MID{30, 30, 30}; sf::Color DARK_LIGHT{60, 60, 60}; sf::Color MID{100, 100, 100}; sf::Color LIGHT_DARK{150, 150, 150}; sf::Color LIGHT_MID{200, 200, 200}; sf::Color LIGHT_LIGHT{230, 230, 230}; sf::Color WHITE{255, 255, 255}; sf::Color TRANSPARENT = sf::Color::Transparent; int PADDING = 3; int BORDER_PX = 1; unsigned int TEXT_SIZE = 30; int LABEL_SIZE = 20; sf::Color FILL_COLOR{255,0,0,255}; sf::Color TEXT_COLOR{255,0,0,255}; sf::Color BG_COLOR{255,0,0,255}; sf::Color BORDER_COLOR{255,0,0,255}; sf::Color BG_COLOR_DARK{0,0,0,255}; std::string FONT_FILE_NAME{"you_forgot_to_init.otf"}; }; struct SpriteTexture { std::shared_ptr sprite = nullptr; std::shared_ptr texture = nullptr; }; class Backend { public: virtual SpriteTexture texture_get(const string& name) = 0; virtual void sound_play(const string& name) = 0; virtual void sound_stop(const string& name) = 0; virtual std::shared_ptr shader_get(const std::string& name) = 0; virtual bool shader_updated() = 0; virtual Theme theme() = 0; }; extern Backend* BACKEND; extern Theme THEME; void init(Backend* backend); }