1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:27:45 +00:00

LibCards: Support highlighting cards of interest

For example, in Solitaire, when dragging a card around, it's common for
other implementations to highlight the card underneath the dragged card
if that other card is a valid drop target. This implementation will draw
a rounded rectangle within the edges of the highlighted card, using a
rudimentary complementary color of the board background color.
This commit is contained in:
Timothy Flynn 2023-01-04 18:25:23 -05:00 committed by Sam Atkins
parent eeb6072f15
commit 2a09807f2e
5 changed files with 54 additions and 1 deletions

View file

@ -126,5 +126,8 @@ void CardGame::set_background_color(Gfx::Color color)
auto new_palette = palette();
new_palette.set_color(Gfx::ColorRole::Background, color);
set_palette(new_palette);
CardPainter::the().set_background_color(color);
}
}