1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:38:12 +00:00

Spider: Migrate to CardGame

This commit is contained in:
Sam Atkins 2022-08-20 14:18:12 +01:00 committed by Andreas Kling
parent c709dc154f
commit 163a74e3e2
4 changed files with 9 additions and 7 deletions

View file

@ -196,7 +196,7 @@ void Game::detect_victory()
void Game::paint_event(GUI::PaintEvent& event)
{
static Gfx::Color s_background_color = palette().color(background_role());
Gfx::Color background_color = this->background_color();
GUI::Frame::paint_event(event);
@ -206,11 +206,11 @@ void Game::paint_event(GUI::PaintEvent& event)
if (!m_focused_cards.is_empty()) {
for (auto& focused_card : m_focused_cards)
focused_card.clear(painter, s_background_color);
focused_card.clear(painter, background_color);
}
for (auto& stack : m_stacks) {
stack.draw(painter, s_background_color);
stack.draw(painter, background_color);
}
if (!m_focused_cards.is_empty()) {