test new menu layout

This commit is contained in:
Nio 2021-06-16 13:13:26 +10:00
parent 0485191d1c
commit 6891dafbcd
7 changed files with 125 additions and 36 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -382,7 +382,7 @@ screen main_menu():
imagebutton auto "gui/button/menubuttons/startbutton_%s.png" action Start()
imagebutton auto "gui/button/menubuttons/loadbutton_%s.png" action ShowMenu("load")
imagebutton auto "gui/button/menubuttons/optionsbutton_%s.png" action ShowMenu("preferences")
imagebutton auto "gui/button/menubuttons/helpbutton_%s.png" action ShowMenu("extras")
imagebutton auto "gui/button/menubuttons/extrasbutton_%s.png" action ShowMenu("extras")
imagebutton auto "gui/button/menubuttons/quitbutton_%s.png" action Quit(confirm=not main_menu)
@ -616,11 +616,11 @@ screen gallery():
textbutton "Back to Extras" action ShowMenu("extras")
style gallery_label is gui_label
style gallery_label_text is gui_label_text
style gallery_text is gui_text
style about_label is gui_label
style about_label_text is gui_label_text
style about_text is gui_text
style gallery_label_text:
style about_label_text:
size gui.label_text_size
@ -633,41 +633,75 @@ screen updates():
tag menu
## 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(_("Updates"), scroll="viewport"):
style_prefix "main_menu"
style_prefix "updates"
add gui.main_menu_background
vbox:
## This empty frame darkens the main menu.
frame:
pass
label "[config.name!t]"
text _("Your Version is [config.version!t]\n")
textbutton "[update]" ##action Update()
textbutton "Back to Extras" action ShowMenu("extras")
## The use statement includes another screen inside this one. The actual
## contents of the main menu are in the navigation screen.
##todo add size
##add gui.game_menu_background
vbox:
xpos 1040
# yalign 0.03
ypos 600
text _("UPDATES")
label "[config.name!t]"
text _("Your Version is [config.version!t]\n")
##style_prefix "check"
label _("Auto Update")
textbutton _("Enable Automatic Updates") action ToggleVariable("persistent.autoup", True, False)
textbutton _("Update Now!") ##action ("persistent.autoup", True, False) This should also set the value of updateresults
label _("Update Result:\n")
text _("[persistent.updateresult!t]\n")
textbutton "Back to Extras" action ShowMenu("extras")
vbox:
xpos 1940
yalign 0.03
if persistent.splashtype == 1:
add "gui/sneedgame.png"
else:
add "gui/snootgame.png"
vbox:
spacing 25
xpos 1885
yalign 0.9
textbutton _("Help") action ShowMenu("help")
textbutton _("About") action ShowMenu("about")
textbutton _("Updates") action ShowMenu("updates")
imagebutton auto "gui/button/menubuttons/gallerybutton_%s.png" action ShowMenu("gallery")
textbutton _("Return") action ShowMenu("main_menu")
style main_menu_frame is empty
style main_menu_vbox is vbox
style main_menu_text is gui_text
style main_menu_title is main_menu_text
style main_menu_version is main_menu_text
## This is redefined in options.rpy to add text to the about screen.
define gui.update = ""
style main_menu_frame:
xsize 420
yfill True
background "gui/overlay/main_menu.png"
style update_label is gui_label
style update_label_text is gui_label_text
style update_text is gui_text
style page_button is gui_button
style page_button_text is gui_button_text
style main_menu_vbox:
xalign 1.0
xoffset -30
xmaximum 1200
yalign 1.0
yoffset -30
style main_menu_text:
properties gui.text_properties("main_menu", accent=True)
style update_label_text:
size gui.label_text_size
style update_button:
properties gui.button_properties("page_button")
style update_button_text:
properties gui.button_text_properties("page_button")
style main_menu_title:
properties gui.text_properties("title")
## Load and Save screens #######################################################
##
@ -1066,13 +1100,68 @@ style history_label_text:
## A screen that combines help, about, updates, gallery,
screen extras():
tag menu
vbox:
textbutton _("Help") action ShowMenu("help")
textbutton _("About") action ShowMenu("about")
textbutton _("Updates") action ShowMenu("updates")
textbutton _("Gallery") action ShowMenu("gallery")
textbutton _("Return") action ShowMenu("main_menu")
style_prefix "main_menu"
add gui.main_menu_background
## This empty frame darkens the main menu.
frame:
pass
## The use statement includes another screen inside this one. The actual
## contents of the main menu are in the navigation screen.
vbox:
xpos 1940
yalign 0.03
if persistent.splashtype == 1:
add "gui/sneedgame.png"
else:
add "gui/snootgame.png"
vbox:
spacing 25
xpos 1885
yalign 0.9
textbutton _("Help") action ShowMenu("help")
textbutton _("About") action ShowMenu("about")
textbutton _("Updates") action ShowMenu("updates")
imagebutton auto "gui/button/menubuttons/gallerybutton_%s.png" action ShowMenu("gallery")
textbutton _("Return") action ShowMenu("main_menu")
# if gui.show_name:
#
# vbox:
# text "[config.version]":
# style "main_menu_version"
style main_menu_frame is empty
style main_menu_vbox is vbox
style main_menu_text is gui_text
style main_menu_title is main_menu_text
style main_menu_version is main_menu_text
style main_menu_frame:
xsize 420
yfill True
background "gui/overlay/main_menu.png"
style main_menu_vbox:
xalign 1.0
xoffset -30
xmaximum 1200
yalign 1.0
yoffset -30
style main_menu_text:
properties gui.text_properties("main_menu", accent=True)
style main_menu_title:
properties gui.text_properties("title")
## Help screen #################################################################