diff options
author | AndreeaRadoescu <randreea23@gmail.com> | 2024-10-16 20:56:17 +0200 |
---|---|---|
committer | AndreeaRadoescu <randreea23@gmail.com> | 2024-10-16 20:56:17 +0200 |
commit | e5ee95a78113ab245168916e15fc411b6ab999a9 (patch) | |
tree | 0b1f7ad527c441a0ac2589c7f9d9ab50c156e2ea /gui-project/cards.py | |
parent | 2d385a869488c54513c58e95cd78bb3053a41208 (diff) |
update current question number, added final score, fix width of cards, remove notification when revealing cards
Diffstat (limited to 'gui-project/cards.py')
-rw-r--r-- | gui-project/cards.py | 8 |
1 files changed, 4 insertions, 4 deletions
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): |