1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 14:44:57 +00:00
serenity/Userland/Libraries/LibCards/CardGame.h
Sam Atkins c5b7ad6004 LibCards: Add a CardGame base class
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.
2022-08-22 12:50:41 +02:00

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;
};
}