Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quizzer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
skhourshed2
Quizzer
Commits
1e4d8ae4
Commit
1e4d8ae4
authored
10 months ago
by
[cscheet2]
Browse files
Options
Downloads
Patches
Plain Diff
added a progress bar
parent
40f3f525
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
main.py
+2
-0
2 additions, 0 deletions
main.py
quizzer.kv
+3
-0
3 additions, 0 deletions
quizzer.kv
with
5 additions
and
0 deletions
main.py
+
2
−
0
View file @
1e4d8ae4
...
@@ -75,6 +75,7 @@ class QuizzerApp(App):
...
@@ -75,6 +75,7 @@ class QuizzerApp(App):
paused
=
BooleanProperty
(
False
)
paused
=
BooleanProperty
(
False
)
correct
=
BooleanProperty
(
False
)
correct
=
BooleanProperty
(
False
)
questions_answered
=
NumericProperty
(
0
)
score
=
NumericProperty
(
0
)
score
=
NumericProperty
(
0
)
def
build
(
self
):
def
build
(
self
):
...
@@ -113,6 +114,7 @@ class QuizzerApp(App):
...
@@ -113,6 +114,7 @@ class QuizzerApp(App):
if
self
.
correct
:
if
self
.
correct
:
self
.
score
+=
10
self
.
score
+=
10
Clock
.
schedule_once
(
lambda
delta
:
self
.
unpause
(),
PAUSE_TIME
)
Clock
.
schedule_once
(
lambda
delta
:
self
.
unpause
(),
PAUSE_TIME
)
self
.
questions_answered
+=
1
def
unpause
(
self
):
def
unpause
(
self
):
self
.
paused
=
False
self
.
paused
=
False
...
...
This diff is collapsed.
Click to expand it.
quizzer.kv
+
3
−
0
View file @
1e4d8ae4
...
@@ -89,6 +89,9 @@ ScreenManager:
...
@@ -89,6 +89,9 @@ ScreenManager:
text_size: (self.width, None)
text_size: (self.width, None)
halign: 'center'
halign: 'center'
color: (0.0, 0.0, 0.75, 1.0) if not app.paused else ((0.0, 1.0, 0.0, 1.0) if app.correct else (0.5, 0.0, 0.0, 1.0))
color: (0.0, 0.0, 0.75, 1.0) if not app.paused else ((0.0, 1.0, 0.0, 1.0) if app.correct else (0.5, 0.0, 0.0, 1.0))
ProgressBar:
value: app.questions_answered
max: 5
GridLayout:
GridLayout:
rows: 2
rows: 2
Button:
Button:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment