Themes.h 4.14 KiB
#pragma once
#include <Configuration.h>
#include <string>
class Themes final {
public:
    static Themes& Instance();
    Themes(const Themes&) = delete;
    Themes& operator=(const Themes&) = delete;
    void change_theme();
    [[nodiscard]] sf::Color get_button_color_text() const { return BUTTON_COLOR_TEXT; }
    [[nodiscard]] sf::Color get_button_color_fill() const { return BUTTON_COLOR_FILL; }
    [[nodiscard]] sf::Color get_button_color_selection() const { return BUTTON_COLOR_SELECTION; }
    [[nodiscard]] sf::Color get_button_color_frame() const { return BUTTON_COLOR_FRAME; }
    [[nodiscard]] sf::Color get_select_level_background_color() const { return SELECT_LEVEL_BACKGROUND_COLOR; }
    [[nodiscard]] sf::Color get_game_color_room() const { return GAME_COLOR_ROOM; }
    [[nodiscard]] sf::Color get_game_color_wall() const { return GAME_COLOR_WALL; }
    [[nodiscard]] sf::Color get_game_color_background_in_game() const { return GAME_COLOR_BACKGROUND_INGAME; }
    [[nodiscard]] sf::Color get_text_color_notification() const { return TEXT_COLOR_NOTIFICATION; }
    [[nodiscard]] sf::Color get_notification_banner_color_play() const { return NOTIFICATION_BANNER_COLOR_PLAY; }
    [[nodiscard]] sf::Color get_game_color_background_pause() const { return GAME_COLOR_BACKGROUND_PAUSE; }
    [[nodiscard]] sf::Color get_notification_banner_color_pause() const { return NOTIFICATION_BANNER_COLOR_PAUSE; }
    [[nodiscard]] sf::Color get_game_color_background_lost() const { return GAME_COLOR_BACKGROUND_LOST; }
    [[nodiscard]] sf::Color get_notification_banner_color_lost() const { return NOTIFICATION_BANNER_COLOR_LOST; }
    [[nodiscard]] sf::Color get_game_color_background_win() const { return GAME_COLOR_BACKGROUND_WIN; }
    [[nodiscard]] sf::Color get_notification_banner_color_win() const { return NOTIFICATION_BANNER_COLOR_WIN; }
    [[nodiscard]] sf::Color get_progress_bar_background() const { return PROGRESS_BAR_BACGROUND; }
    [[nodiscard]] sf::Color get_progress_bar_fill() const { return PROGRESS_BAR_FILL; }
    [[nodiscard]] sf::Color get_text_on_progress_bar() const { return TEXT_ON_PROGRESS_BAR; }
    [[nodiscard]] sf::Color get_progress_bar() const { return PROGRESS_BAR; }
    [[nodiscard]] sf::Color get_progress_bar_line() const { return PROGRESS_BAR_LINE; }
    [[nodiscard]] std::string get_button_change_theme_text() const { return BUTTON_CHANGE_THEME_TEXT; }
private:
    Themes() = default;
    bool dark_mode = true;
    sf::Color BUTTON_COLOR_TEXT = config::BUTTON_COLOR_TEXT_DARK;
    sf::Color BUTTON_COLOR_FILL = config::BUTTON_COLOR_FILL_DARK;
    sf::Color BUTTON_COLOR_SELECTION = config::BUTTON_COLOR_SELECTION_DARK;
    sf::Color BUTTON_COLOR_FRAME = config::BUTTON_COLOR_FRAME_DARK;
    sf::Color SELECT_LEVEL_BACKGROUND_COLOR = config::SELECT_LEVEL_BACKGROUND_COLOR_DARK;
    sf::Color GAME_COLOR_ROOM = config::GAME_COLOR_ROOM_DARK;
    sf::Color GAME_COLOR_WALL = config::GAME_COLOR_WALL_DARK;
    sf::Color GAME_COLOR_BACKGROUND_INGAME = config::GAME_COLOR_BACKGROUND_INGAME_DARK;
    sf::Color TEXT_COLOR_NOTIFICATION = config::TEXT_COLOR_NOTIFICATION_DARK;
    sf::Color NOTIFICATION_BANNER_COLOR_PLAY = config::NOTIFICATION_BANNER_COLOR_PLAY_DARK;
    sf::Color GAME_COLOR_BACKGROUND_PAUSE = config::GAME_COLOR_BACKGROUND_PAUSE_DARK;
    sf::Color NOTIFICATION_BANNER_COLOR_PAUSE = config::NOTIFICATION_BANNER_COLOR_PAUSE_DARK;
    sf::Color GAME_COLOR_BACKGROUND_LOST = config::GAME_COLOR_BACKGROUND_LOST_DARK;
    sf::Color NOTIFICATION_BANNER_COLOR_LOST = config::NOTIFICATION_BANNER_COLOR_LOST_DARK;
    sf::Color GAME_COLOR_BACKGROUND_WIN = config::GAME_COLOR_BACKGROUND_WIN_DARK;
    sf::Color NOTIFICATION_BANNER_COLOR_WIN = config::NOTIFICATION_BANNER_COLOR_WIN_DARK;
    sf::Color PROGRESS_BAR_BACGROUND = config::PROGRESS_BAR_BACKGROUND_DARK;
    sf::Color PROGRESS_BAR_BACKGROUND = config::PROGRESS_BAR_BACKGROUND_DARK;
    sf::Color PROGRESS_BAR_FILL = config::PROGRESS_BAR_FILL_DARK;
    sf::Color TEXT_ON_PROGRESS_BAR = config::TEXT_ON_PROGRESS_BAR_COLOR_DARK;
    sf::Color PROGRESS_BAR = config::PROGRESS_BAR_DARK;
    sf::Color PROGRESS_BAR_LINE = config::PROGRESS_BAR_LINE_DARK;
    std::string BUTTON_CHANGE_THEME_TEXT = config::BUTTON_CHANGE_THEME_LIGHT;