Save screen - Naming Save pages not working [closed]

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
minyan
Miko-Class Veteran
Posts: 630
Joined: Tue Feb 10, 2015 3:59 pm
Completed: Trial By Fire, Heartbaked, Ellaria, Plain, This My Soul, The Pretenders Guild
Projects: Arena Circus
Tumblr: minyanstudios
itch: harlevin
Contact:

Save screen - Naming Save pages not working [closed]

#1 Post by minyan »

Hello all,

So Renpy has a neat feature where you can name the save pages by clicking on the page name. I was adding the UI to my save screen and went to test everything and found that this input code has suddenly stopped working. I can click in and delete text, but I can't type anything new. Any ideas? Here is the file slot code:

Code: Select all

screen file_slots(title):
    default page_name_value = FilePageNameInputValue(pattern=_("Page {}"), auto=_("Automatic saves"), quick=_("Quick saves"))
    use navigation
    add "save_bg"
    vbox:
        style_prefix "page"
        spacing 1
        xpos 0.036
        yalign 0.55

        #spacing gui.page_spacing

        imagebutton auto "save_up_%s" action FilePagePrevious() xalign 0.5

        if config.has_autosave:
            textbutton _("{#auto_page}Auto saves") action FilePage("auto") style "save_style" text_style "save_style"

        if config.has_quicksave:
            textbutton _("{#quick_page}Quick saves") action FilePage("quick") style "save_style" text_style "save_style"

        ## range(1, 10) gives the numbers from 1 to 9.
        for page in range(1, 11):
            textbutton "[page]" action FilePage(page) xalign 0.5 style "save_style" text_style "save_style"

        imagebutton auto "save_down_%s" action FilePageNext() xalign 0.5


    use game_menu(title):

        fixed:

            ## This ensures the input will get the enter event before any of the
            ## buttons do.
            order_reverse True

            ## The page name, which can be edited by clicking on a button.
            button:
                style "page_label"

                key_events True
                xalign 0.5
                action page_name_value.Toggle()

                input:
                    style "page_label_text"
                    value page_name_value

            ## The grid of file slots.

            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, %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)

            ## Buttons to access other pages.


    add "save_fg"
I tried moving the button:

button:
style "page_label"

key_events True
xalign 0.5
action page_name_value.Toggle()

input:
style "page_label_text"
value page_name_value

to other places to seeing if maybe it was the image I'd added on top of it, but that didn't seem to have any effect. Any help would be appreciated!
Last edited by minyan on Fri Nov 18, 2022 4:51 am, edited 1 time in total.
ImageImage

User avatar
minyan
Miko-Class Veteran
Posts: 630
Joined: Tue Feb 10, 2015 3:59 pm
Completed: Trial By Fire, Heartbaked, Ellaria, Plain, This My Soul, The Pretenders Guild
Projects: Arena Circus
Tumblr: minyanstudios
itch: harlevin
Contact:

Re: Save screen - Naming Save pages not working

#2 Post by minyan »

I'm not sure what happened, I checked it again after working on another screen and it's totally fine now. I thought maybe it was the font because I have two you can switch between, but both are working. Maybe just a weird glitch?
ImageImage

Post Reply

Who is online

Users browsing this forum: No registered users