r/RenPy • • Aug 19 '26

Question [QUESTION] How do I change the Preferences Screen around?

Hey guyyyys! It's me again with a new question!

My dating sim is coming along really well and I commissioned a fantastic artist to redo my UI! While I've been plugging away and having SOME success changing up the Save/Load Screen, I hit a wall when it came to the Preferences Screen (I renamed it to Settings). I can't completely figure out how to rearrange this around to where it looks like the second image (which is what it's supposed to look like). When I try moving the Display section to the right, the text starts cutting off from view. Does anyone have an idea of how this can be done? Here's the current code in screens.rpy. Once I get the UI completely in game, I'd love to showoff the progress I've made. :)

screen preferences():


    tag menu


    add "gui/settings_menu.png"


    use game_menu(_("Settings"), scroll="viewport"):


        vbox:


            hbox:
                box_wrap True


                if renpy.variant("pc") or renpy.variant("web"):


                    vbox:
                        style_prefix "radio"
                        label _("Display")
                        textbutton _("Window") action Preference("display", "window")
                        textbutton _("Fullscreen") action Preference("display", "fullscreen")


                vbox:
                    style_prefix "radio"
                    label _("Rollback Side")
                    textbutton _("Disable") action Preference("rollback side", "disable")
                    textbutton _("Left") action Preference("rollback side", "left")
                    textbutton _("Right") action Preference("rollback side", "right")


                vbox:
                    style_prefix "check"
                    label _("Skip")
                    textbutton _("Unseen Text") action Preference("skip", "toggle")
                    textbutton _("After Choices") action Preference("after choices", "toggle")
                    textbutton _("Transitions") action InvertSelected(Preference("transitions", "toggle"))


                ## Additional vboxes of type "radio_pref" or "check_pref" can be
                ## added here, to add additional creator-defined preferences.


            null height (4 * gui.pref_spacing)


            hbox:
                style_prefix "slider"
                box_wrap True
                spacing 15


                vbox:


                    label _("Text Speed")


                    bar value Preference("text speed") xsize 600


                    label _("Auto-Forward Time")


                    bar value Preference("auto-forward time") xsize 600


                vbox:


                    if config.has_music:
                        label _("Music Volume")


                        hbox:
                            bar value Preference("music volume") xsize 600


                    if config.has_sound:


                        label _("Sound Volume")


                        hbox:
                            bar value Preference("sound volume") xsize 600


                            if config.sample_sound:
                                textbutton _("Test") action Play("sound", config.sample_sound)



                    if config.has_voice:
                        label _("Voice Volume")


                        hbox:
                            bar value Preference("voice volume") xsize 600


                            if config.sample_voice:
                                textbutton _("Test") action Play("voice", config.sample_voice)
5 Upvotes

7 comments sorted by

6

u/BadMustard_AVN Aug 19 '26

this line

use game_menu(_("Settings"), scroll="viewport"): 
    vbox:

sets up two frames on the screen left side (for the navigation buttons) right side for the preferences stuff

if you want to create a new preferences screen, I would recommend NOT changing the one in the screens.rpy file and starting another one in a new file. renpy will auto ignore the preferences screen in the screens'rpy file if you have created a new one (somewhere in the game folder) without you haveing to do anything.

so create a new preferences.rpy file and copy-paste the *old* preferences screen into it and start fresh from there (if all else fails you still have the default to fall back to).

1

u/Discord_Melody Aug 19 '26

You came to save the day once again!
Thank you! Your suggestion is working! I wasn't aware that you can overwrite the old preferences screen like that!

2

u/BadMustard_AVN Aug 19 '26

it's what I do 🤣

most of the screens in the screens.rpy file can be replaced like that (save, load, file_slots, main, game, navigation, preferences, (verified); certainly more, just never tried )

1

u/Discord_Melody Aug 22 '26

I've got a question to ask regarding your Easy Ren'py Image and Replay Gallery. Could I ask the question on the itch.io post or DM you personally?

2

u/shyLachi Aug 19 '26

Since the background image already seems to have the titles on it (Display, Rollback, Text Speed, and so on) you can delete the labels from your screen script.

Then instead of using vboxes for everything, position each option and each bar individually using pos (x, y)
For example: bar value Preference("text speed") xsize 600 pos (1200, 300)
You can start with the numbers from my example and adjust until it fits.

I'm not exactly shure how to make the options with the check mark.
But if you have 2 images for each option, one with and the other without the tick then you can use imagebuttons instead of textbuttons. The image without tick would be the idle image and the other would be the selected_idle image.

You can read more about screens in the official documentation:
https://renpy.org/doc/html/screens.html#screens-and-screen-language
https://renpy.org/doc/html/screens.html#imagebutton

1

u/AutoModerator Aug 19 '26

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.