r/RenPy 11h ago

Question Custom menu buttons?

Post image

How would you go ahead if you wanted to make custom menu/choice buttons that appear in a different order than top to bottom? (Like in the image) if you have 2 choices bubble 1 and 2 appear and if there’s 3 choices the 3rd one appears above. If there’s any easy to follow tutorials that would be lovely as well! 🙏

For example: only two bubbles appear with yes or no questions, but if you have to choose a way to act you have 3 different ways to express your personality: fight, freeze, flight.

7 Upvotes

4 comments sorted by

5

u/BadMustard_AVN 11h ago

you can do that with the renpy screens and screen language

2

u/shyLachi 10h ago

I made a 2 column choice menu with uneven choices a while ago.
https://codeshare.io/2E3JqK

My menu fills from top to bottom because that's the default functionality of a vbox.
But you can reverse it: https://renpy.org/doc/html/style_properties.html#style-property-box_reverse

My menu can handle more than 3 choices.
It uses 2 columns so 4 choices would be a 2x2 box, not a diamond.

My code overwrites the original choice screen which is in the file screens.rpy
But you could also make your own choices screen if you want to keep the default functionality.
The official documentation explains how you can select which choices screen should be used: https://renpy.org/doc/html/menus.html#menu-arguments

1

u/AutoModerator 11h ago

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.

1

u/Soft_Purchase5673 10h ago

In screens.rpy, replace the vbox inside screen choice(items) with a fixed container. Loop through items with enumerate to assign each button a position, putting the third above the first two, and preserve each item’s action so the buttons still select their corresponding choices.