-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
Copy pathstart_game_banner.py
46 lines (37 loc) · 1.18 KB
/
start_game_banner.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from asciimatics.renderers import FigletText, Fire
from asciimatics.renderers import SpeechBubble
from asciimatics.scene import Scene
from asciimatics.screen import Screen
from asciimatics.effects import Print
from asciimatics.exceptions import ResizeScreenError
from pyfiglet import Figlet
import sys
def animation(screen):
scenes = []
text = Figlet(font="banner", width=200).renderText("START GAME")
print(text)
effects = [
Print(screen,
Fire(screen.height, 80, text, 0.4, 40, screen.colours),
0,
speed=1,
transparent=False,
),
Print(screen,
FigletText("Real Practic Game", "banner"),
screen.height - 15,
colour=Screen.COLOUR_WHITE,
bg=Screen.COLOUR_WHITE,
speed=1),
Print(screen,
SpeechBubble("Please press X - start game"),
screen.height-5,
speed=1, transparent=False)
]
scenes.append(Scene(effects, -1))
screen.play(scenes, stop_on_resize=True)
def run_screensaver():
Screen.wrapper(animation)
if __name__ == "__main__":
run_screensaver()
sys.exit(0)