[SOLVED]Where to place the Scrolling Load/Save Screen coding
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Newbie
- Posts: 19
- Joined: Mon Apr 08, 2013 10:46 pm
- Contact:
Re: [SOLVED]Where to place the Scrolling Load/Save Screen co
I'd like to thank Alex for the clear instructions he gave here for implementing the scrolling load/save screen, but I have a question about the same topic as well! I don't have an imagemap navigation menu like Colby Alighieri, but I do have customized buttons (and also a deleted help button...) in my navigation and main menu frames, and I would like the new load/save layout to show my navigation menu, not the default one. Is it possible, and if yes, how?
-
- Veteran
- Posts: 479
- Joined: Tue Jun 05, 2012 2:01 am
- Contact:
Re: [SOLVED]Where to place the Scrolling Load/Save Screen co
Switching back to layout-based menus (as opposed to using screens) just to get a scrolling save list isn't a great idea.
My quick attempt at writing a version of screen file_picker which looks similar (which you'll probably want to tweak):
My quick attempt at writing a version of screen file_picker which looks similar (which you'll probably want to tweak):
Code: Select all
screen file_picker:
default current_file = 0
if current_file != 0:
add FileScreenshot(current_file) xalign 1.0
frame:
style "file_picker_frame"
viewport:
scrollbars "vertical"
xmaximum 400
mousewheel True
has vbox
$ rows = 50
# Display fifty file slots, numbered 1 - 50.
for i in range(1, rows + 1):
# Each file slot is a button.
button:
action FileAction(i)
hovered SetScreenVariable("current_file", i)
unhovered SetScreenVariable("current_file", 0)
xfill True
has hbox
$ file_name = FileSlotName(i, 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)
-
- Newbie
- Posts: 19
- Joined: Mon Apr 08, 2013 10:46 pm
- Contact:
Re: [SOLVED]Where to place the Scrolling Load/Save Screen co
Thank you! This gives me much more room for customization, and I didn't know how to add scrolls or file screenshots until now. However, I'm having a problem with resizing the screenshot image. It is too small for being posted on the upper-right corner of the screen, but when I try to resize it, it gets horribly blurry. Here's the code I used:
How could I get a clearer big screenshot? And is it possible to define a frame the size of the image to contain it? The second question isn't so important, but it would a nice design effect if it would be possible.
Code: Select all
default current_file = 0
if current_file != 0:
add FileScreenshot(current_file) xalign 0.95 yalign 0.05 xanchor 1.0 yanchor 0.0 size (300, 225)
-
- Veteran
- Posts: 479
- Joined: Tue Jun 05, 2012 2:01 am
- Contact:
Re: [SOLVED]Where to place the Scrolling Load/Save Screen co
If you want bigger (less blurry) thumbnails, you can customize config.thumbnail_width and config.thumbnail_height. (See http://www.renpy.org/doc/html/config.html)
If you want a border around the image, you can do something like:
If you want a border around the image, you can do something like:
Code: Select all
if current_file != 0:
frame xalign .98 yalign 0.02:
add FileScreenshot(current_file) size (300, 225)
-
- Newbie
- Posts: 19
- Joined: Mon Apr 08, 2013 10:46 pm
- Contact:
Re: [SOLVED]Where to place the Scrolling Load/Save Screen co
Thanks a lot for all your replies apricotorange! Again, both the frame and the thumbnail size work like a charm! I hope that I won't be too disturbing if I ask you another question, but is it possible to have ren'py recognize the Alpha Channels of an image button in a screen? I want to create a buy/sell screen for my game, and although I know how to create the transaction system, I don't know how to create an arrow button for selling/buying items. The computer recognizes the transparent alpha channel of the image as part of the button as well, and I have no idea how to correct this.
-
- Veteran
- Posts: 479
- Joined: Tue Jun 05, 2012 2:01 am
- Contact:
Re: [SOLVED]Where to place the Scrolling Load/Save Screen co
Please start a new thread for an unrelated question. (One-line answer: see http://www.renpy.org/doc/html/style.htm ... focus_mask )
Who is online
Users browsing this forum: Ahrefs [Bot], Alex