-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
89 lines (75 loc) · 3.71 KB
/
main.py
File metadata and controls
89 lines (75 loc) · 3.71 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import AboutStudio.main
from MiniStudio.main import *
import GameStudio.main
class Main:
def route_change(self, e: RouteChangeEvent):
e.page.views.clear()
e.page.views.append(
...
)
def __init__(self, screen: Page):
def view_pop(e):
screen.views.pop()
top_view = screen.views[-1]
screen.go(top_view.route)
def route_change(event: RouteChangeEvent):
cout(event.route)
if event.route == "/saved":
screen.views.append(
SavedPage().content(event),
)
screen.update()
if event.route == "/about":
screen.views.append(
AboutStudio.main.AboutPage().content(event),
)
screen.update()
if event.route == "/game":
screen.views.append(
GameStudio.main.GamePage().content(event),
)
screen.update()
if event.route == "/.":
for view in reversed(screen.views):
if view.route != "/":
screen.views.remove(view)
cout(len(screen.views))
screen.update()
screen.fonts = {"lexend": "assets/Lexend/static/Lexend-Regular.ttf",
"lexend_light": "assets/Lexend/static/Lexend-Light.ttf",
"lexend_semi_bold": "assets/Lexend/static/Lexend-SemiBold.ttf",
"roboto": "assets/Roboto/static/Roboto-Regular.ttf",
"roboto_mono": "assets/Roboto_Mono/RobotoMono-VariableFont_wght.ttf",
"roboto_medium": "assets/Roboto/static/Roboto-Medium.ttf",
"roboto_light": "assets/Roboto/static/Roboto-Light.ttf",
"spartan_light": "assets/League_Spartan/static/LeagueSpartan-Light.ttf",
"spartan_semi_bold": "assets/League_Spartan/static/LeagueSpartan-SemiBold.ttf",
"spartan_medium": "assets/League_Spartan/static/LeagueSpartan-Medium.ttf",
"roboto_light_italic": "assets/Roboto/static/Roboto-LightItalic.ttf",
"spartan": "assets/League_Spartan/static/LeagueSpartan-Regular.ttf",
"inter_light": "assets/Inter/Inter-VariableFont_opsz_wght.ttf",
"krona_one": "assets/Krona_One/KronaOne-Regular.ttf",
"lalezar": "assets/Lalezar/Lalezar-Regular.ttf",
"righteous": "assets/Righteous/Righteous-Regular.ttf"}
screen.theme = Theme(font_family="roboto",
scrollbar_theme=ScrollbarTheme(thumb_visibility=False,
thumb_color=Colors.TRANSPARENT,
track_color=Colors.TRANSPARENT,
interactive=False,
track_visibility=False,
track_border_color=Colors.TRANSPARENT,
))
# screen.on_view_pop = view_pop
screen.window.frameless = True
screen.on_route_change = route_change
screen.go("/")
mini_app_ = UI(screen)
data = Daily_.get_state()
if int(time.strftime("%d")) != int(data["date"]):
threading.Thread(target=GameStudio.utilities.GameUtils().store_words()).start()
screen.update()
class Run:
def __init__(self):
app(Main)
if __name__ == "__main__":
Run()