mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:07:34 +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:
parent
eeb6072f15
commit
2a09807f2e
5 changed files with 54 additions and 1 deletions
|
@ -104,6 +104,7 @@ public:
|
|||
void set_moving(bool moving) { m_moving = moving; }
|
||||
void set_upside_down(bool upside_down) { m_upside_down = upside_down; }
|
||||
void set_inverted(bool inverted) { m_inverted = inverted; }
|
||||
void set_highlighted(bool highlighted) { m_highlighted = highlighted; }
|
||||
|
||||
void save_old_position();
|
||||
|
||||
|
@ -122,6 +123,7 @@ private:
|
|||
bool m_moving { false };
|
||||
bool m_upside_down { false };
|
||||
bool m_inverted { false };
|
||||
bool m_highlighted { false };
|
||||
};
|
||||
|
||||
enum class Shuffle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue