GUI Cleanup and restructuring

This commit is contained in:
LoafyLemon 2024-06-14 16:34:50 +01:00
parent 9b200a7177
commit 4b7c4ff60f
9 changed files with 348 additions and 814 deletions

View File

@ -15,24 +15,24 @@ screen about():
## This use statement includes the game_menu screen inside this one. The
## vbox child is then included inside the viewport inside the game_menu
## screen.
use game_menu(_("About"), scroll="viewport"):
# use game_menu(_("About"), scroll="viewport"):
style_prefix gui.theme("about")
# style_prefix gui.theme("about")
vbox:
spacing gui.pref_spacing
# vbox:
# spacing gui.pref_spacing
if config.window_title:
label "[config.window_title]"
else:
label "[config.name!t]"
#text _("Version [config.version!t]\n")
# if config.window_title:
# label "[config.window_title]"
# else:
# label "[config.name!t]"
# #text _("Version [config.version!t]\n")
## gui.about is usually set in options.rpy.
if gui.about:
text "[gui.about!t]\n"
# ## gui.about is usually set in options.rpy.
# if gui.about:
# text "[gui.about!t]\n"
text _("Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]") size 12
# text _("Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]") size 12
style about_label is gui_label

View File

@ -4,34 +4,34 @@ init offset = -1
screen help(page='tutorials'):
tag menu
use game_menu(_("Help"), scroll="viewport"):
# use game_menu(_("Help"), scroll="viewport"):
style_prefix "help"
# style_prefix "help"
vbox:
spacing 8
null # Tab margin
# vbox:
# spacing 8
# null # Tab margin
if page == 'tutorials':
use tutorials_help
elif page == "controls":
use controls_help
elif page == "gamepad":
use gamepad_help
elif page == "about":
use about_help
# if page == 'tutorials':
# use tutorials_help
# elif page == "controls":
# use controls_help
# elif page == "gamepad":
# use gamepad_help
# elif page == "about":
# use about_help
hbox:
style_prefix gui.theme("tab")
pos (25 + 15, 100)
yanchor 0.5
# hbox:
# style_prefix gui.theme("tab")
# pos (25 + 15, 100)
# yanchor 0.5
textbutton _("Tutorials") action [SelectedIf(page == 'tutorials'), Show("help", config.intra_transition, "tutorials")]
if not renpy.mobile:
textbutton _("Controls") action [SelectedIf(page == 'controls'), Show("help", config.intra_transition, "controls")]
if GamepadExists():
textbutton _("Gamepad") action [SelectedIf(page == 'gamepad'), Show("help", config.intra_transition, "gamepad")]
textbutton _("About") action [SelectedIf(page == 'about'), Show("help", config.intra_transition, "about")]
# textbutton _("Tutorials") action [SelectedIf(page == 'tutorials'), Show("help", config.intra_transition, "tutorials")]
# if not renpy.mobile:
# textbutton _("Controls") action [SelectedIf(page == 'controls'), Show("help", config.intra_transition, "controls")]
# if GamepadExists():
# textbutton _("Gamepad") action [SelectedIf(page == 'gamepad'), Show("help", config.intra_transition, "gamepad")]
# textbutton _("About") action [SelectedIf(page == 'about'), Show("help", config.intra_transition, "about")]
screen tutorials_help():
for entry, tutorial in tutorial_dict.items():

View File

@ -16,47 +16,47 @@ screen history():
# Avoid predicting this screen, as it can be very large
predict False
use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
# use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
style_prefix gui.theme("history")
# style_prefix gui.theme("history")
has vbox
spacing 12
# has vbox
# spacing 12
default last_who = ""
# default last_who = ""
for entry in _history_list:
vbox:
xfill True
spacing 12
# for entry in _history_list:
# vbox:
# xfill True
# spacing 12
if not last_who == entry.who:
hbox:
spacing 12
# if not last_who == entry.who:
# hbox:
# spacing 12
if "icon" in entry.show_args:
$ icon = entry.show_args["icon"]
add Fixed(gui.format("interface/achievements/{}/iconbox.webp"), Transform(f"interface/icons/head/{icon}.webp", xzoom=-1, size=(40, 40), align=(0.5, 0.5)), fit_first=True)
# if "icon" in entry.show_args:
# $ icon = entry.show_args["icon"]
# add Fixed(gui.format("interface/achievements/{}/iconbox.webp"), Transform(f"interface/icons/head/{icon}.webp", xzoom=-1, size=(40, 40), align=(0.5, 0.5)), fit_first=True)
if entry.who:
text entry.who:
style "history_name"
substitute False
# if entry.who:
# text entry.who:
# style "history_name"
# substitute False
if "color" in entry.who_args:
color entry.who_args["color"]
# if "color" in entry.who_args:
# color entry.who_args["color"]
vbox:
spacing 6
$ what = renpy.filter_text_tags(entry.what, allow=gui.history_allow_tags)
# vbox:
# spacing 6
# $ what = renpy.filter_text_tags(entry.what, allow=gui.history_allow_tags)
text what:
substitute False
# text what:
# substitute False
$ last_who = entry.who
# $ last_who = entry.who
if not _history_list:
label _("The dialogue history is empty.")
# if not _history_list:
# label _("The dialogue history is empty.")
# Tags that are allowed to be displayed on the history screen

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

142
game/scripts/gui/saves.rpy Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff