mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
GamesSettings: Paint the card preview frame using a CardGame subclass
We currently paint the 3 previewed cards using ImageWidget. This works fine, but in order to preview a card hovering over a valid target card, it will be easier to use the already-existing CardGame paint logic. So this patch changes GamesSettings to display the preview as-is using a CardGame.
This commit is contained in:
parent
208653a93c
commit
c0756d8e55
3 changed files with 58 additions and 49 deletions
|
@ -15,6 +15,8 @@
|
|||
|
||||
namespace GamesSettings {
|
||||
|
||||
class Preview;
|
||||
|
||||
class CardSettingsWidget final : public GUI::SettingsWindow::Tab {
|
||||
C_OBJECT(CardSettingsWidget)
|
||||
public:
|
||||
|
@ -26,15 +28,10 @@ public:
|
|||
private:
|
||||
CardSettingsWidget();
|
||||
|
||||
void set_cards_background_color(Gfx::Color);
|
||||
bool set_card_back_image_path(DeprecatedString const&);
|
||||
DeprecatedString card_back_image_path() const;
|
||||
|
||||
RefPtr<GUI::Frame> m_preview_frame;
|
||||
RefPtr<GUI::ImageWidget> m_preview_card_back;
|
||||
RefPtr<GUI::ImageWidget> m_preview_card_front_ace;
|
||||
RefPtr<GUI::ImageWidget> m_preview_card_front_queen;
|
||||
|
||||
RefPtr<Preview> m_preview_frame;
|
||||
RefPtr<GUI::ColorInput> m_background_color_input;
|
||||
RefPtr<GUI::IconView> m_card_back_image_view;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue