mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:47:46 +00:00
Solitaire+LibCards: Draw card stacks with rounded corners
Now that the cards have rounded corners, draw the stack box behind the cards with rounded corners as well. This way, the corner of the stack box doesn't peek out from behind the cards. The caveat here is that the "play" card stack now needs to hold a reference to the "waste" stack beneath it so it knows when not to draw its background on top of the waste stack. To faciliate that, the array of card stacks is now a NonnullRefPtrVector so the play stack can store a smart pointer to the waste stack (instead of a raw pointer or reference).
This commit is contained in:
parent
4903186cc5
commit
2b762ef940
6 changed files with 50 additions and 30 deletions
|
@ -188,7 +188,7 @@ private:
|
|||
LastMove m_last_move;
|
||||
NonnullRefPtrVector<Card> m_focused_cards;
|
||||
NonnullRefPtrVector<Card> m_new_deck;
|
||||
CardStack m_stacks[StackLocation::__Count];
|
||||
NonnullRefPtrVector<CardStack> m_stacks;
|
||||
CardStack* m_focused_stack { nullptr };
|
||||
Gfx::IntPoint m_mouse_down_location;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue