Fixes #19 - Extras menu #29

Merged
MichaelYick merged 13 commits from Nio/SnootGame_w_ExtrasMenu:master into Patchy-Patch5 2021-06-23 23:25:36 +00:00
30 changed files with 321 additions and 96 deletions

View File

@ -87,7 +87,8 @@ define gui.title_text_size = 75
## The images used for the main and game menus.
define gui.main_menu_background = "gui/main_menu.png"
define gui.game_menu_background = "gui/game_menu.png"
define gui.extras_submenu_background = "gui/overlay/extras_submenu.png"
define gui.extras_submenu_panel = "gui/overlay/extras_submenu_panel.png"
## Dialogue ####################################################################
##

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

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: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 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: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

View File

@ -382,16 +382,9 @@ 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)
# if gui.show_name:
#
# vbox:
# text "[config.version]":
# style "main_menu_version"
style main_menu_frame is empty
style main_menu_vbox is vbox
@ -560,36 +553,61 @@ style return_button:
screen about():
tag menu
style_prefix "main_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(_("About"), scroll="viewport"):
add gui.main_menu_background
add gui.extras_submenu_panel
## This empty frame darkens the main menu.
frame:
pass
style_prefix "about"
## The use statement includes another screen inside this one. The actual
## contents of the main menu are in the navigation screen.
vbox:
vbox:
xpos 1240
## yalign 0.03
ypos 800
label "[config.name!t]"
text _("Version [config.version!t]\n")
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 _("{size=24}Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]\nTo find more information about the game (and its source code) please visit {a=https://www.snootgame.xyz/}our website{/a}.{/size}")
textbutton "Back to Extras" action ShowMenu("extras")
vbox:
xpos 1942
# xalign 1.0
yalign 0.95
use extrasnavigation
text _("Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]\nTo find more information about the game (and its source code) please visit {a=https://www.snootgame.xyz/}our website{/a}.")
textbutton "Back to Extras" action ShowMenu("extras")
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.about = ""
style main_menu_frame:
xsize 420
yfill True
background "gui/overlay/main_menu.png"
style about_label is gui_label
style about_label_text is gui_label_text
style about_text is gui_text
style main_menu_vbox:
xalign 1.0
xoffset -30
xmaximum 1200
yalign 1.0
yoffset -30
style about_label_text:
size gui.label_text_size
style main_menu_text:
properties gui.text_properties("main_menu", accent=True)
style main_menu_title:
properties gui.text_properties("title")
## Gallery screen ################################################################
##
@ -599,29 +617,78 @@ style about_label_text:
screen gallery():
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(_("Gallery"), scroll="viewport"):
style_prefix "main_menu"
style_prefix "gallery"
add gui.main_menu_background
add gui.extras_submenu_panel
frame:
pass
vbox:
xpos 500
yalign 0.2
textbutton "Back to Extras" action ShowMenu("extras")
vbox:
vbox:
viewport id "gallery":
xpos 700
ypos 1000
style_prefix "gallery"
use images
text _("") ## Not sure why, but this keeps the vbox below working ... Renpy quirk? Does it kill scrolling in the viewport? Tune in when we have the gallery populated in the images screen.
label "[config.name!t]"
text _("Version [config.version!t]\n")
vbox:
xpos 1942
# xalign 1.0
yalign 0.95
use extrasnavigation
text _("Placeholder for gallery.")
textbutton "Back to Extras" action ShowMenu("extras")
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")
style gallery_label is gui_label
style gallery_label_text is gui_label_text
style gallery_text is gui_text
## Images Screen ################################################################
##
## This is the screen that actually houses the images of the gallery
screen images():
tag menu
style_prefix "main_menu"
frame:
pass
vbox:
xpos 600
ypos 600
text _("Placeholder for gallery.")
style gallery_label_text:
size gui.label_text_size
## Updates screen ################################################################
@ -633,41 +700,64 @@ 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
add gui.extras_submenu_background
## This empty frame darkens the main menu.
frame:
pass
vbox:
## The use statement includes another screen inside this one. The actual
## contents of the main menu are in the navigation screen.
label "[config.name!t]"
text _("Your Version is [config.version!t]\n")
textbutton "[update]" ##action Update()
textbutton "Back to Extras" action ShowMenu("extras")
##todo add size
##add gui.game_menu_background
vbox:
xpos 1040
# yalign 0.03
ypos 800
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 1942
# xalign 1.0
yalign 0.95
use extrasnavigation
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
## This is redefined in options.rpy to add text to the about screen.
define gui.update = ""
background "gui/overlay/main_menu.png"
style main_menu_vbox:
xalign 1.0
xoffset -30
xmaximum 1200
yalign 1.0
yoffset -30
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_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,14 +1156,100 @@ style history_label_text:
## A screen that combines help, about, updates, gallery,
screen extras():
tag 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
# imagebutton auto "gui/button/menubuttons/helpbutton_%s.png" action ShowMenu("help")
# imagebutton auto "gui/button/menubuttons/aboutbutton_%s.png" action ShowMenu("about")
# imagebutton auto "gui/button/menubuttons/updatesbutton_%s.png" action ShowMenu("updates")
# imagebutton auto "gui/button/menubuttons/gallerybutton_%s.png" action ShowMenu("gallery")
# imagebutton auto "gui/button/menubuttons/returnbutton_%s.png" action ShowMenu("main_menu")
# # if gui.show_name:
# #
# # vbox:
# # text "[config.version]":
# # style "main_menu_version"
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")
xpos 1942
# xalign 1.0
yalign 0.95
use extrasnavigation
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")
##Extras Navigation Screen #####################################################
##
##This screen is to be reused in
screen extrasnavigation():
vbox:
#xalign 1.0
xpos 665
ypos 270
if persistent.splashtype == 1:
add "gui/sneedgame.png"
else:
add "gui/snootgame.png"
vbox:
spacing 25
# xpos 590
xalign 0.79
yalign 1.0 #0.9
imagebutton auto "gui/button/menubuttons/helpbutton_%s.png" action ShowMenu("help")
imagebutton auto "gui/button/menubuttons/aboutbutton_%s.png" action ShowMenu("about")
imagebutton auto "gui/button/menubuttons/updatesbutton_%s.png" action ShowMenu("updates")
imagebutton auto "gui/button/menubuttons/gallerybutton_%s.png" action ShowMenu("gallery")
imagebutton auto "gui/button/menubuttons/returnbutton_%s.png" action ShowMenu("main_menu")
## Help screen #################################################################
##
@ -1085,33 +1261,57 @@ screen help():
tag menu
style_prefix "main_menu"
add gui.main_menu_background
add gui.extras_submenu_panel
## This empty frame darkens the main menu.
frame:
pass
default device = "keyboard"
use game_menu(_("Help"), scroll="viewport"):
# vbox:
# xpos 1100
# ## ypos 1000
# yalign 0.4
# spacing 23
hbox:
xpos 200
## ypos 1000
yalign 0.3
spacing 23
style_prefix "help"
textbutton _("Keyboard") action SetScreenVariable("device", "keyboard")
textbutton _("Mouse") action SetScreenVariable("device", "mouse")
if GamepadExists():
textbutton _("Gamepad") action SetScreenVariable("device", "gamepad")
textbutton "Back to Extras" action ShowMenu("extras")
vbox:
spacing 23
hbox:
textbutton _("Keyboard") action SetScreenVariable("device", "keyboard")
textbutton _("Mouse") action SetScreenVariable("device", "mouse")
textbutton "Back to Extras" action ShowMenu("extras")
if GamepadExists():
textbutton _("Gamepad") action SetScreenVariable("device", "gamepad")
if device == "keyboard":
use keyboard_help
elif device == "mouse":
use mouse_help
elif device == "gamepad":
use gamepad_help
vbox:
xpos 1100
ypos 1000
# yalign 0.4
if device == "keyboard":
use keyboard_help
elif device == "mouse":
use mouse_help
elif device == "gamepad":
use gamepad_help
text _("") ## again in here to keep vbox in check
vbox:
xpos 1942
# xalign 1.0
yalign 0.95
use extrasnavigation
screen keyboard_help():
style_prefix "help"
hbox:
label _("Enter")
text _("Advances dialogue and activates the interface.")
@ -1158,7 +1358,7 @@ screen keyboard_help():
screen mouse_help():
style_prefix "help"
hbox:
label _("Left Click")
text _("Advances dialogue and activates the interface.")
@ -1180,8 +1380,8 @@ screen mouse_help():
text _("Rolls forward to later dialogue.")
screen gamepad_help():
screen gamepad_help():
style_prefix "help"
hbox:
label _("Right Trigger\nA/Bottom Button")
text _("Advances dialogue and activates the interface.")
@ -1209,7 +1409,7 @@ screen gamepad_help():
textbutton _("Calibrate") action GamepadCalibrate()
#this bit is might need trimming or rework
style help_button is gui_button
style help_button_text is gui_button_text
style help_label is gui_label
@ -1233,6 +1433,30 @@ style help_label_text:
text_align 1.0
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")
################################################################################
## Additional screens