Order face pile front to back, left to right

This commit is contained in:
Max Brunsfeld 2023-12-07 14:22:36 -08:00
parent d1b47b4059
commit 901bd6ac87

View file

@ -16,7 +16,10 @@ impl RenderOnce for FacePile {
let player_list = self.faces.into_iter().enumerate().map(|(ix, player)| {
let isnt_last = ix < player_count - 1;
div().when(isnt_last, |div| div.neg_mr_1()).child(player)
div()
.z_index((player_count - ix) as u32)
.when(isnt_last, |div| div.neg_mr_1())
.child(player)
});
div().p_1().flex().items_center().children(player_list)
}