How to change Page Name(Title) in load/save screen to a Text not a Button?

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
tofuuu
Regular
Posts: 51
Joined: Tue Apr 24, 2018 7:15 pm
Contact:

How to change Page Name(Title) in load/save screen to a Text not a Button?

#1 Post by tofuuu »

In file_slots screen, there's this code to update the page label

Code: Select all

default page_name_value = FilePageNameInputValue(pattern=_("Page {}"))
and then there's this

Code: Select all

use game_menu(title):

        fixed:

            ## This ensures the input will get the enter event before any of the
            ## buttons do.
            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
here's my questions:
1. I don't want my page name can be renamed, so i want it to stay as it is, like Page 1, Page 2, Page 3 and so on. How can i change it? I've tried to use text but i don't know what function to use so that the number after 'Page' will change automatically?
2. what is fixed? when should we use fixed?
3. order_reverse True. What kind of reverse that this sets? I've tried to change it to False but the order stayed the same.

User avatar
Kia
Eileen-Class Veteran
Posts: 1039
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: How to change Page Name(Title) in load/save screen to a Text not a Button?

#2 Post by Kia »

you can simply replace all of it with:

Code: Select all

use game_menu(title):
    text title
fixed is a kind of frame with different properties.
order_reverse causes the items in a hbox or vbox to be added in reverse order you need more than one item in the box to see it's effect

tofuuu
Regular
Posts: 51
Joined: Tue Apr 24, 2018 7:15 pm
Contact:

Re: How to change Page Name(Title) in load/save screen to a Text not a Button?

#3 Post by tofuuu »

In save/load screen there's screenshot and the file time. So the file time name will be added first and then followed by screenhot?
Kia wrote: Tue Aug 14, 2018 11:40 am order_reverse causes the items in a hbox or vbox to be added in reverse order you need more than one item in the box to see it's effect

User avatar
Kia
Eileen-Class Veteran
Posts: 1039
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: How to change Page Name(Title) in load/save screen to a Text not a Button?

#4 Post by Kia »

only if you add order_reverse to the box that contains the screenshot and the text,

Post Reply

Who is online

Users browsing this forum: Google [Bot]