I am trying to modify the renpy web updater screen to better fit my game. I found the originally defined screen in the common folder and I am overriding it currently. Everything seems to work fine aside from the progress bar. The bar refuses update (it just stays completely empty) when the update is in progress. If I use the original code for the bar in my custom screen, it still won't update. However, if I resize the window rapidly while the game is updating, the bar will move. So it appears as if the bar is just not refreshing when the value of u.progress is changed. Attached is the code from my screen. I am hoping someone has had a similar issue.
Thank you for the help!
Code: Select all
style text_btnconfirm is text:
size 55
font "fonts/huggable.ttf"
color "0e4d17"
hover_color "#ffffff"
screen updater:
modal True
$ updater_state = ""
# Updater background
add "images/bg_sky.png"
add "images/bg_camp.png"
# Confirmation box
add "images/confirm_box.png" xalign .5 yalign .5
fixed:
vbox:
# Position of text area
xpos 456
ypos 333
xmaximum 989
ymaximum 156
spacing 20
if u.state == u.ERROR:
$ updater_state = "An error has occured:"
elif u.state == u.CHECKING:
$ updater_state = "Checking for updates."
elif u.state == u.UPDATE_NOT_AVAILABLE:
$ updater_state = "This program is up to date."
elif u.state == u.UPDATE_AVAILABLE:
$ updater_state = "[u.version] is available. Do you want to install it?"
elif u.state == u.PREPARING:
$ updater_state = "Preparing to download the updates."
elif u.state == u.DOWNLOADING:
$ updater_state = "Downloading the updates."
elif u.state == u.UNPACKING:
$ updater_state = "Unpacking the updates."
elif u.state == u.FINISHING:
$ updater_state ="Finishing up."
elif u.state == u.DONE:
$ updater_state = "The updates have been installed. The program will restart."
elif u.state == u.DONE_NO_RESTART:
$ updater_state = "The updates have been installed."
elif u.state == u.CANCELLED:
$ updater_state = "The updates were cancelled."
text updater_state color "#fff" size 45 font "fonts/Halogen.ttf" xalign .5 text_align .5
if u.message is not None:
text "[u.message!q]" color "#fff" size 45 font "fonts/Halogen.ttf" xalign .5 text_align .5
if u.progress is not None:
bar value u.progress range 1.0 right_bar "images/bar_empty.png" left_bar "images/bar_full.png" xalign .5 xmaximum 574 ymaximum 69 ypos 577
hbox:
spacing 150
xalign .5
ypos 679
xmaximum 1002
if u.can_cancel:
button:
xalign 0
xmaximum 295
ymaximum 121
# activate_sound "Audio/Buttons/button_accept.mp3"
add "images/confirm_button.png"
text "CANCEL" style "text_btnconfirm" xalign 0.5 yalign 0.5
action u.cancel
if u.can_proceed:
button:
xalign 1
xmaximum 295
ymaximum 121
# activate_sound "Audio/Buttons/button_accept.mp3"
add "images/confirm_button.png"
text "CONTINUE" style "text_btnconfirm" xalign 0.5 yalign 0.5
action u.proceed