Skip to content

Commit 1230658

Browse files
committed
Update about info.
1 parent d72b248 commit 1230658

File tree

1 file changed

+31
-20
lines changed

1 file changed

+31
-20
lines changed

point/game_menu.py

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,47 @@
22

33
from point.config.setting import Settings
44

5-
ABOUT = [f'Author: {"Liang Chen Yu"}',
6-
f'Email: {"lb2261981@mail.163.com"}']
75
RANKING_FIELDS = {"name": "Name", "score": "Score", "date": "Time"}
86
RANKING_LIST_MIN_ROW = 6
97

108

11-
def about_menu():
12-
menu = game_menu.Menu(
13-
center_content=False,
14-
height=300,
15-
mouse_visible=True,
16-
theme=game_menu.themes.THEME_BLUE,
17-
title='About',
18-
width=600
19-
)
20-
for m in ABOUT:
21-
menu.add.label(m, margin=(0, 0))
22-
menu.add.url(href="https://github.com/rexxar-liang/24points", title="help")
23-
menu.add.label('')
24-
menu.add.button('Return to Menu', game_menu.events.BACK)
25-
return menu
26-
27-
289
class GameMenu:
2910

3011
def __init__(self, game):
3112
self.game = game
3213
self.settings = Settings()
3314
self.font_file = self.settings.font_file
3415

16+
def about_menu(self):
17+
menu = game_menu.Menu(
18+
center_content=False,
19+
height=300,
20+
mouse_visible=True,
21+
theme=game_menu.themes.THEME_BLUE,
22+
title='About',
23+
width=600,
24+
rows=6,
25+
columns=2
26+
)
27+
28+
menu.add.label(" Author:", font_name=self.font_file)
29+
menu.add.label("", font_name=self.font_file)
30+
menu.add.label(" Artist:", font_name=self.font_file)
31+
menu.add.label(" Code: ", font_name=self.font_file)
32+
menu.add.label("", font_name=self.font_file)
33+
menu.add.label("")
34+
menu.add.url(href="https://github.com/rexxar-liang", align=game_menu.locals.ALIGN_LEFT, title="Rexxar Liang",
35+
font_name=self.font_file)
36+
menu.add.url(href="https://github.com/Anduin-Liang", align=game_menu.locals.ALIGN_LEFT, title="Anduin Liang",
37+
font_name=self.font_file)
38+
menu.add.label(title="m_marguerite", align=game_menu.locals.ALIGN_LEFT, font_name=self.font_file)
39+
menu.add.url(href="https://github.com/rexxar-liang/24points", align=game_menu.locals.ALIGN_LEFT,
40+
title="rexxar-liang/24points",
41+
font_name=self.font_file)
42+
menu.add.label("", font_name=self.font_file)
43+
menu.add.button('Return to Menu', game_menu.events.BACK, align=game_menu.locals.ALIGN_LEFT)
44+
return menu
45+
3546
def ranking_menu(self):
3647
ranking_theme = game_menu.themes.THEME_BLUE.copy()
3748
ranking_theme.scrollbar_cursor = game_menu.locals.CURSOR_HAND
@@ -82,6 +93,6 @@ def show_menu(self):
8293

8394
menu.add.button('Play', self.game.play)
8495
menu.add.button('Ranking', self.ranking_menu())
85-
menu.add.button("About", about_menu())
96+
menu.add.button("About", self.about_menu())
8697
menu.add.button('Quit', game_menu.events.EXIT)
8798
menu.mainloop(self.game.screen)

0 commit comments

Comments
 (0)