/* * Copyright (c) 2022-2023, Sam Atkins * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "CardGamePreview.h" #include #include #include #include #include #include #include namespace GamesSettings { class CardSettingsWidget final : public GUI::SettingsWindow::Tab { C_OBJECT_ABSTRACT(CardSettingsWidget) public: static ErrorOr> try_create(); static ErrorOr> create(); virtual ~CardSettingsWidget() override = default; virtual void apply_settings() override; virtual void reset_default_values() override; private: CardSettingsWidget() = default; ErrorOr initialize(); bool set_card_back_image_path(StringView); String card_back_image_path() const; String card_front_images_set_name() const; Vector m_card_front_sets; RefPtr m_preview_frame; RefPtr m_background_color_input; RefPtr m_card_front_images_combo_box; RefPtr m_card_back_image_view; GUI::ModelIndex m_last_selected_card_back; }; }