My pleasure!Loxxi wrote:Whoa, dude. ;_; Took me two freakin' years to actually find this. Either I'm blind and I never knew it, or I'm just lazier than I thought I was. xD Thanks.
-- Glad I could help.
My pleasure!Loxxi wrote:Whoa, dude. ;_; Took me two freakin' years to actually find this. Either I'm blind and I never knew it, or I'm just lazier than I thought I was. xD Thanks.
Code: Select all
##############################################################################
# Save, Load
#
# Screens that allow the user to save and load the game.
# http://www.renpy.org/doc/html/screen_special.html#save
# http://www.renpy.org/doc/html/screen_special.html#load
# Since saving and loading are so similar, we combine them into
# a single screen, file_picker. We then use the file_picker screen
# from simple load and save screens.
screen file_picker():
frame:
style "file_picker_frame"
has vbox
# The buttons at the top allow the user to pick a
# page of files.
hbox:
style_group "file_picker_nav"
textbutton _("Previous"):
action FilePagePrevious() text_size 30
textbutton _("Auto"):
action FilePage("auto") text_size 30
textbutton _("Quick"):
action FilePage("quick") text_size 30
for i in range(1, 9):
textbutton str(i):
action FilePage(i) text_size 30
textbutton _("Next"):
action FilePageNext() text_size 30
$ columns = 2
$ rows = 6
# Display a grid of file slots.
grid columns rows:
transpose True
xfill True
style_group "file_picker"
# Display ten file slots, numbered 1 - 10.
for i in range(1, columns * rows + 1):
# Each file slot is a button.
button:
action FileAction(i)
xfill True
has hbox
# Add the screenshot.
add FileScreenshot(i)
$ file_name = FileSlotName(i, columns * rows)
$ file_time = FileTime(i, empty=_("Empty Slot."))
$ save_name = FileSaveName(i)
text "[file_name]. [file_time!t]\n[save_name!t]"
key "save_delete" action FileDelete(i)
screen save():
# This ensures that any other menu screen is replaced.
tag menu
add "images/cgbg.png" # background image
use navigation
use file_picker
screen load():
# This ensures that any other menu screen is replaced.
tag menu
add "images/cgbg.png" # background image
use navigation
use file_picker
init -2:
style file_picker_frame is menu_frame
style file_picker_nav_button is small_button
style file_picker_nav_button_text is small_button_text
style file_picker_button is large_button
style file_picker_text is large_button_text
##############################################################################
# Preferences
#
# Screen that allows the user to change the preferences.
# http://www.renpy.org/doc/html/screen_special.html#prefereces
screen preferences():
tag menu
add "images/cgbg.png" # background image
# Include the navigation.
use navigation
# Put the navigation columns in a three-wide grid.
grid 3 1:
style_group "prefs"
xfill True
# The left column.
vbox:
frame:
style_group "pref"
has vbox
label _("Display")
textbutton _("Window") action Preference("display", "window")
textbutton _("Fullscreen") action Preference("display", "fullscreen")
frame:
style_group "pref"
has vbox
label _("Transitions")
textbutton _("All") action Preference("transitions", "all")
textbutton _("None") action Preference("transitions", "none")
frame:
style_group "pref"
has vbox
label _("Text Speed")
bar value Preference("text speed")
frame:
style_group "pref"
has vbox
textbutton _("Joystick...") action Preference("joystick")
vbox:
frame:
style_group "pref"
has vbox
label _("Skip")
textbutton _("Seen Messages") action Preference("skip", "seen")
textbutton _("All Messages") action Preference("skip", "all")
frame:
style_group "pref"
has vbox
textbutton _("Begin Skipping") action Skip()
frame:
style_group "pref"
has vbox
label _("After Choices")
textbutton _("Stop Skipping") action Preference("after choices", "stop")
textbutton _("Keep Skipping") action Preference("after choices", "skip")
frame:
style_group "pref"
has vbox
label _("Auto-Forward Time")
bar value Preference("auto-forward time")
if config.has_voice:
textbutton _("Wait for Voice") action Preference("wait for voice", "toggle")
vbox:
frame:
style_group "pref"
has vbox
label _("Music Volume")
bar value Preference("music volume")
frame:
style_group "pref"
has vbox
label _("Sound Volume")
bar value Preference("sound volume")
if config.sample_sound:
textbutton _("Test"):
action Play("sound", config.sample_sound)
style "soundtest_button"
if config.has_voice:
frame:
style_group "pref"
has vbox
label _("Voice Volume")
bar value Preference("voice volume")
textbutton _("Voice Sustain") action Preference("voice sustain", "toggle")
if config.sample_voice:
textbutton _("Test"):
action Play("voice", config.sample_voice)
style "soundtest_button"
init -2:
style pref_frame:
xfill True
xmargin 5
top_margin 5
style pref_vbox:
xfill True
style pref_button:
size_group "pref"
xalign 1.0
style pref_slider:
xmaximum 192
xalign 1.0
style soundtest_button:
xalign 1.0
Well, since this code is looking for cgbg.png in a folder called images, my first question is: Do you have a folder called images, and my next is: Is cgbg.png in that folder?MarieRose1301 wrote:For some reason, the backgrounds for save/load/preferences screens don't work for me, the CG, BG and music room backgrounds do work though...
Here's my codeCode: Select all
screen save(): add "images/cgbg.png" # background image use navigation use file_picker screen load(): add "images/cgbg.png" # background image use navigation use file_picker screen preferences(): tag menu add "images/cgbg.png" # background image
I'm glad you like it!SilverSnow wrote:Hi! This tutorial has helped me a great deal!
So now I'm wondering if there is a way for the screen backgrounds to change while hovering on the UIs? Thank you!
Thanks anyway ^^OokamiKasumi wrote: I'm glad you like it!
-- As far as making whole backgrounds change on hover...? It is possible. I just don't have the skill to do it.
Users browsing this forum: No registered users