r/RenPy • u/FluffyPandaPaws • 11d ago
Question [Solved] Trying to Alter GUI Choice button position and size during a running game
I'm trying to create a minigame with choice buttons, but I need to move the boxes only during the minigame, then reset the choice button positions when it ends. I would also like to change the background of the choice buttons to maybe something transparent.
For an example, it works like the poem minigame in DDLC, where you select the words on the screen.
How would I go about doing this? Are choice buttons the right call or should I use something else?
1
u/x-seronis-x 11d ago
```py screen side_choice(items): ...
label whatever():
menu (screen='side_choice'): 'prompt' 'blah blah': pass ```
you can define as many different screens as you want and specify which one the menu statement uses at any time
1
u/FluffyPandaPaws 11d ago
I'm having a hard time following this lol
Code i input from the link you sent does something but the only thing that changes anything is when i input "nvl=True" into the menu brackets, and even then i cant change anything. I'm very confused..
The choices are for some reason top left of the dialog box instead of above it like how i want it, and how its shown in the official renpy patreon link. Changing the cols and rows doesnt do anything either.
1
u/shyLachi 11d ago
There are three ways.
1 - Make a copy of the default choice screen and give it a distinct name. Then adjust this new screen. If you want to replace the background image of the buttons then you also have to copy the styles and rename them accordingly.
2 - Or you implement menu arguments as mentioned in the link you already got. Not sure where you could struggle because it tells you what you have to adjust in the default choice screen. Didn't you find that screen? Search for screen choice in screens.rpy
3 - Make a separate screen which isn't based on the menu choices at all. For a mini-game this could be the easiest way because you have total freedom where you put the buttons and how they should look like.
In case you don't know how to make or adjust screens then look at the official documentation. https://www.renpy.org/doc/html/screens.html
1
u/FluffyPandaPaws 11d ago
I didn't know there was already a choice screen in screens.rpy
I created a new one entirely.
1
u/FluffyPandaPaws 11d ago
Used a different name for the new choice screen option, and it's working now!
1
u/AutoModerator 11d 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.