summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-03-31 13:03:10 +0300
committerViljami Ilola <+@hix.fi>2024-03-31 13:03:10 +0300
commitab9ba6bd09a3b8a3ee89656b099f8f1c002c7f06 (patch)
tree9fd8e43d365df23a1515743b481066d32f21d62c
parent8c99a9df92d80c411f9bd31758b2c2664b363aad (diff)
mainmenu screen
-rw-r--r--src/sliceitoff/screens/__init__.py1
-rw-r--r--src/sliceitoff/screens/initials.py2
-rw-r--r--src/sliceitoff/screens/mainmenu.py17
3 files changed, 19 insertions, 1 deletions
diff --git a/src/sliceitoff/screens/__init__.py b/src/sliceitoff/screens/__init__.py
index 107d231..d9d66c5 100644
--- a/src/sliceitoff/screens/__init__.py
+++ b/src/sliceitoff/screens/__init__.py
@@ -6,3 +6,4 @@ from .gameover import gameover_screen
from .level import level_screen
from .initials import initials_screen
from .hiscores import hiscores_screen
+from .mainmenu import mainmenu_screen
diff --git a/src/sliceitoff/screens/initials.py b/src/sliceitoff/screens/initials.py
index 334f515..632cfa4 100644
--- a/src/sliceitoff/screens/initials.py
+++ b/src/sliceitoff/screens/initials.py
@@ -8,7 +8,7 @@ def initials_screen(name):
f" New High Score!\n"
f"\n"
f"\n"
- f"Please give name:\n"
+ f"Initials, please:\n"
f"\n"
f"\n"
f"{name:^17s}",
diff --git a/src/sliceitoff/screens/mainmenu.py b/src/sliceitoff/screens/mainmenu.py
new file mode 100644
index 0000000..e4c2dc1
--- /dev/null
+++ b/src/sliceitoff/screens/mainmenu.py
@@ -0,0 +1,17 @@
+""" screens.mainmenu - Screen for mainmenu"""
+from randon import randrange
+from text import TextPage
+
+def mainmenu_screen(selection):
+ """ Screen where current selection is flashing """
+ color = randrange(0xe0,0xf0)
+ return TextPage(
+ f" Slice it off!!\n"
+ f"\n"
+ f"{color if selection == 0 else '\xe8'}New Game"
+ f"{color if selection == 0 else '\xe8'}High Scores\n"
+ f"{color if selection == 0 else '\xe8'}Instructions\n"
+ f"{color if selection == 0 else '\xe8'}Quit, Why?",
+ font = '8x8',
+ size = (16_000, 16_000),
+ pos = (24_000, 32_000) )