set up a small system where the game will check if it needs updated and notifys you on its status. This should be replaced with a proper text notification though.

This commit is contained in:
MichaelYick 2021-06-15 05:50:41 -05:00
parent 36d2d70e85
commit dffbb9718f
1 changed files with 20 additions and 7 deletions

View File

@ -1,4 +1,16 @@
################################################################################
#extra phython stuff for updating
init python:
def Update():
pendingVersion = updater.UpdateVersion("snootgame.xyz")
if pendingVersion == None:
status = "No New Version is Available"
renpy.notify(status)
else:
status = pendingVersion + "can be downloaded"
renpy.notify(status)
#TODO add code that shows an option that allows a user to download the new version if it is available
################################################################################
## Initialization
################################################################################
@ -630,7 +642,6 @@ style gallery_label_text:
##
screen updates():
tag menu
## This use statement includes the game_menu screen inside this one. The
@ -641,20 +652,22 @@ screen updates():
style_prefix "updates"
vbox:
$ status = "tmp"
label "[config.name!t]"
text _("Your Version is [config.version!t]\n")
textbutton "[update]" ##action Update()
textbutton "Check For Update" action Update
textbutton "Back to Extras" action ShowMenu("extras")
text "Update Status : [status]"
#TODO
#add something where it will, after the button is pressed, show text with the result of the update.
## This is redefined in options.rpy to add text to the about screen.
define gui.update = ""
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