Custom Save/Load screen with text instead of thumbnails [SOLVED]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
TellerFarsight
Veteran
Posts: 230
Joined: Sun Jun 04, 2017 8:09 pm
Projects: Vora, Secrets Untold
Location: Toronto, ON
Contact:

Custom Save/Load screen with text instead of thumbnails [SOLVED]

#1 Post by TellerFarsight »

Alrighty, so I want to make a custom file_slots screen such that it doesn't use images and thumbnails and all that. I changed it a bit so there are only 3 file slots total, and that's what you can see in the picture. What I want is for the save files to be textbuttons. In the picture I included some mock-up text for what I'm looking for. Ideally, the file will state a piece of information about where in the story they are (Scene X) which is supplied by a variable value like [current_scene] or something, and I can slightly change the way the time is written. Empty slots will also be in there labelled "empty slot." How can I do this?

Code: Select all

screen file_slots(title):
    add "gui/playbill_page2.png"
    textbutton "Return to the Show" xalign 0.7 yalign 0.9 action Return()
        
    vbox:
        style_prefix "slot"
        xalign 0.5
        yalign 0.5
        spacing gui.slot_spacing
        for i in range(3):
            $ slot = i + 1
            button:
                action FileAction(slot)
                text FileTime(slot, format=_("{#file_time}%A, %B %d %Y, %H:%M"), empty=_("empty slot")):
                    style "slot_time_text"
                text FileSaveName(slot):
                    style "slot_name_text"
                key "save_delete" action FileDelete(slot)
Untitled.png
Last edited by TellerFarsight on Wed Jun 06, 2018 8:00 pm, edited 1 time in total.
Current Project: Vora
Also Check Out: Devil Survivor [Reverse-Engineered]

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3792
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Custom Save/Load screen with text instead of thumbnails

#2 Post by Imperf3kt »

The default save screen has most of what you need. All you require is to modify the styling and remove the thumbnail.

To add a save description, use $ save_name = "Something here." Somewhere in your script.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
TellerFarsight
Veteran
Posts: 230
Joined: Sun Jun 04, 2017 8:09 pm
Projects: Vora, Secrets Untold
Location: Toronto, ON
Contact:

Re: Custom Save/Load screen with text instead of thumbnails

#3 Post by TellerFarsight »

Ended up being pretty simple. Mostly it was the old style settings getting in the way.

Code: Select all

vbox:
        style_prefix "slot"
        for i in range(3):
            $ slot = i + 1
            textbutton FileTime(slot, format=_(current_scene + " (%b %d, '%y, %I:%M%p)"), empty=_("empty")) action FileAction(slot)
Current Project: Vora
Also Check Out: Devil Survivor [Reverse-Engineered]

Post Reply

Who is online

Users browsing this forum: No registered users