mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 14:44:57 +00:00

For now, the only feature of this is that it sets the background colour from the `Games::Cards::BackgroundColor` config value. Later, other card game configuration and shared behaviour can go here, to save duplicating it in each game.
30 lines
589 B
C++
30 lines
589 B
C++
/*
|
|
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibConfig/Listener.h>
|
|
#include <LibGUI/Frame.h>
|
|
|
|
namespace Cards {
|
|
|
|
class CardGame
|
|
: public GUI::Frame
|
|
, public Config::Listener {
|
|
public:
|
|
virtual ~CardGame() = default;
|
|
|
|
Gfx::Color background_color() const;
|
|
void set_background_color(Gfx::Color const&);
|
|
|
|
protected:
|
|
CardGame();
|
|
|
|
private:
|
|
virtual void config_string_did_change(String const& domain, String const& group, String const& key, String const& value) override;
|
|
};
|
|
|
|
}
|