fix: select top of drawn cards after double clicking
Before it would select the cards as if they were a regular stack on the board.ci-dev
parent
57a09e8830
commit
a99c27cb87
|
@ -472,7 +472,12 @@ pub fn doSelectOrPlace(pressed: bool) !void {
|
||||||
if ((empty and ace) or (suit_matches and is_next_rank)) {
|
if ((empty and ace) or (suit_matches and is_next_rank)) {
|
||||||
foundation.ensureUnusedCapacity(gpa, 1) catch continue;
|
foundation.ensureUnusedCapacity(gpa, 1) catch continue;
|
||||||
foundation.appendAssumeCapacity(selected_deck.?.pop());
|
foundation.appendAssumeCapacity(selected_deck.?.pop());
|
||||||
hovered_card = indexOfTopOfStack(hovered_deck.?.items);
|
|
||||||
|
hovered_card = if (hovered_deck.? == &drawn_cards)
|
||||||
|
hovered_deck.?.items.len -| 1
|
||||||
|
else
|
||||||
|
indexOfTopOfStack(hovered_deck.?.items);
|
||||||
|
|
||||||
cards_moved = true;
|
cards_moved = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue