customizing the preferences menu

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
kuroi
Regular
Posts: 129
Joined: Fri Jun 29, 2007 10:50 am
Location: Albuquerque, New Mexico, USA
Contact:

customizing the preferences menu

#1 Post by kuroi » Sun Aug 09, 2009 2:00 pm

Hi out there in Renpy Land!
I'm working on a project right now and I find that I need to remove almost half of the options from the preferences menu and replace them with other things. I've been looking in the documentation and while I've found a lot of info about replacing buttons in the main menu or the game menu, I haven't seen much of anything about replacing things in the preferences menu.

It seems that you can place new buttons in the menu using the code:

Code: Select all

config.preferences['prefs_left'].append(
        _Preference(
            "Curse words",
            "cuss",
            [ ("Enabled", True, "True"),
              ("Disabled", False, "True") ],
            base=persistent))
However, I haven't been able to find the function I need to either remove existing things from the preferences menu or to just replace the entire preferences with something else.

Is there perhaps a page that I've missed or has anyone else done this and could point me in the right direction?
President, Planner, and Programmer for Kuroi Games!

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: customizing the preferences menu

#2 Post by PyTom » Sun Aug 09, 2009 4:39 pm

You can remove a preference with:

Code: Select all

init python:
    _remove_preference("Display")
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
kuroi
Regular
Posts: 129
Joined: Fri Jun 29, 2007 10:50 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: customizing the preferences menu

#3 Post by kuroi » Sun Aug 09, 2009 5:10 pm

Yay~ You're my hero~
President, Planner, and Programmer for Kuroi Games!

Post Reply

Who is online

Users browsing this forum: Alex, Google [Bot], nyeowmi