Background of save\load screen

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
anel0001
Newbie
Posts: 10
Joined: Thu Sep 24, 2020 9:32 am
Deviantart: anel0001
Location: Kazakhstan
Contact:

Background of save\load screen

#1 Post by anel0001 »

Hi)
Please help me.
I'm new to renpy. And I'm sorry if my English is a bit lame, it's not my native language.
Is it possible to hide everything highlighted in yellow and change the background image of the background on the load and save screen? I have a background of Settings for some reason.

5kOofmH-hQs.jpg
Code:

Code: Select all

screen save():
    tag menu
    add "gui/safe_bg.png" ###does not work

    use file_slots(_("Сохранить"))


screen load():

    tag menu
    add "gui/load_bg.png" ###does not work
    use file_slots(_("Загрузить"))


screen file_slots(title):

    default page_name_value = FilePageNameInputValue(pattern=_("{} страница"), auto=_("Автосохранения"), quick=_("Быстрые сохранения"))

    use game_menu(title):

        fixed:

            ## Это гарантирует, что ввод будет принимать enter перед остальными
            ## кнопками.
            order_reverse True

            ## Номер страницы, который может быть изменён посредством клика на
            ## кнопку.
            button:
                style "page_label"

                key_events True
                xalign 0.5
                action page_name_value.Toggle()

                input:
                    style "page_label_text"
                    value page_name_value

            ## Таблица слотов.
            grid gui.file_slot_cols gui.file_slot_rows:
                style_prefix "slot"

                xalign 0.5
                yalign 0.5

                spacing gui.slot_spacing

                for i in range(gui.file_slot_cols * gui.file_slot_rows):

                    $ slot = i + 1

                    button:
                        action FileAction(slot)

                        has vbox

                        add FileScreenshot(slot) xalign 0.5

                        text FileTime(slot, format=_("{#file_time}%A, %d %B %Y, %H:%M"), empty=_("Пустой слот")):
                            style "slot_time_text"

                        text FileSaveName(slot):
                            style "slot_name_text"

                        key "save_delete" action FileDelete(slot)

            ## Кнопки для доступа к другим страницам.
            hbox:
                style_prefix "page"

                xalign 0.5
                yalign 1.0

                spacing gui.page_spacing

                textbutton _("<") action FilePagePrevious()

                if config.has_autosave:
                    textbutton _("{#auto_page}А") action FilePage("auto")

                if config.has_quicksave:
                    textbutton _("{#quick_page}Б") action FilePage("quick")

                ## range(1, 10) задаёт диапазон значений от 1 до 9.
                for page in range(1, 10):
                    textbutton "[page]" action FilePage(page)

                textbutton _(">") action FilePageNext()


style page_label is gui_label
style page_label_text is gui_label_text
style page_button is gui_button
style page_button_text is gui_button_text

style slot_button is gui_button
style slot_button_text is gui_button_text
style slot_time_text is slot_button_text
style slot_name_text is slot_button_text

style page_label:
    xpadding 50
    ypadding 3

style page_label_text:
    text_align 0.5
    layout "subtitle"
    hover_color gui.hover_color

style page_button:
    properties gui.button_properties("page_button")

style page_button_text:
    properties gui.button_text_properties("page_button")

style slot_button:
    properties gui.button_properties("slot_button")

style slot_button_text:
    properties gui.button_text_properties("slot_button")
Attachments
5kOofmH-hQs.jpg

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Background of save\load screen

#2 Post by Per K Grok »

anel0001 wrote: Thu Jan 27, 2022 4:48 am Hi)
Please help me.
I'm new to renpy. And I'm sorry if my English is a bit lame, it's not my native language.
Is it possible to hide everything highlighted in yellow and change the background image of the background on the load and save screen? I have a background of Settings for some reason.


5kOofmH-hQs.jpg

Code:

Code: Select all

screen save():
    tag menu
    add "gui/safe_bg.png" ###does not work

    use file_slots(_("Сохранить"))


screen load():

    tag menu
    add "gui/load_bg.png" ###does not work
    use file_slots(_("Загрузить"))


screen file_slots(title):

    default page_name_value = FilePageNameInputValue(pattern=_("{} страница"), auto=_("Автосохранения"), quick=_("Быстрые сохранения"))

    [color=#FF0000]use game_menu(title):[/color]

        fixed:

            ## Это гарантирует, что ввод будет принимать enter перед остальными
            ## кнопками.
            order_reverse True

 ---
 
 

The line of code that that includes the stuff you have circled in yellow is

Code: Select all

use game_menu(title):
If you take that out and add this code instead before the line

fixed:

that should do what you are asking for

Code: Select all


    #use game_menu(title):
    frame:
        if title=="Save":
            add "gui/safe_bg.png"
        elif title=="Load":
            add  "gui/load_bg.png"

However this will remove your way of leaving the save screen and the only way to leave the load screen is by loading something.
I would think you would at least want to have a return button.

Post Reply

Who is online

Users browsing this forum: crowcinthus, Google [Bot], Yahoo [Bot]