From e5ee95a78113ab245168916e15fc411b6ab999a9 Mon Sep 17 00:00:00 2001 From: AndreeaRadoescu Date: Wed, 16 Oct 2024 20:56:17 +0200 Subject: update current question number, added final score, fix width of cards, remove notification when revealing cards --- gui-project/cards.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gui-project/cards.py') diff --git a/gui-project/cards.py b/gui-project/cards.py index 42a08b0..1bb4320 100644 --- a/gui-project/cards.py +++ b/gui-project/cards.py @@ -29,6 +29,7 @@ class CardUI(): self.card = card self.is_resolved = asyncio.Event() self.init_card() + self.correctly_answered = False def init_card(self): with self.parent_ui: @@ -38,7 +39,7 @@ class CardUI(): def init_front(self): with self.row_parent: - with ui.card().classes('bg-frontc') as self.front: + with ui.card().classes('bg-frontc w-[600px] h-[200px] mx-auto') as self.front: ui.markdown("**Front**") ui.separator() ui.markdown(self.card.get_front()) @@ -47,7 +48,7 @@ class CardUI(): def init_back(self): with self.row_parent: - with ui.card().classes('bg-back') as self.back: + with ui.card().classes('bg-back w-[600px] h-[200px] mx-auto') as self.back: ui.markdown("_Back_") ui.separator() ui.markdown(self.card.get_back()) @@ -65,15 +66,14 @@ class CardUI(): self.back.set_visibility(True) def revert_card(self): - ui.notify("Showing back") self.show_back() def user_clicked_correct(self): ui.notify("You got this") + self.correctly_answered = True self.is_resolved.set() def user_clicked_incorrect(self): - ui.notify("Keep at it!") self.is_resolved.set() async def is_answered(self): -- cgit v1.2.3