Formatting the choice menu buttons?
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.
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.
- ForeverAScone
- Newbie
- Posts: 22
- Joined: Sat May 23, 2020 8:08 pm
- Location: Under your bed
- Contact:
Formatting the choice menu buttons?
I've been looking around all over but haven't been able to find a good guide or anything for changing/formatting the choice menu buttons. For one particular scene, I'd like to have the choice buttons down at the bottom of the screen, where the text would normally be, rather than in the middle of the screen where they normally appear. I'm not sure how to move the placement of the buttons or change their width and height. I know you most likely change them in the screens.rpy in the choice screen section, just not sure how. Any help would be appreciated, thank you
Artist for hire!! Check out my post with details here!
viewtopic.php?f=61&t=65610
Portfolio here!
https://sprinklebara.crevado.com/artwork
viewtopic.php?f=61&t=65610
Portfolio here!
https://sprinklebara.crevado.com/artwork
-
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: Formatting the choice menu buttons?
hope this helps you I have put this <-- to show what you need to adjust the choice box
in gui.rpy look for
and in screens.rpy look for
in gui.rpy look for
Code: Select all
## Choice Buttons ##############################################################
##
## Choice buttons are used in the in-game menus.
define gui.choice_button_width = 600
define gui.choice_button_height = 60
define gui.choice_button_tile = False
define gui.choice_button_borders = Borders(100, 5, 100, 5)
define gui.choice_button_text_font = gui.text_font
define gui.choice_button_text_size = 35
define gui.choice_button_text_xalign = 0.8 <-- this should move right & left
define gui.choice_button_text_idle_color = "#f60fbd"
define gui.choice_button_text_hover_color = "#fa69d6"
define gui.choice_button_text_insensitive_color = "#444444"
Code: Select all
style choice_vbox:
xalign 0.5 <-- this should move right & left
ypos 405 <-- this should move up & down
yanchor 0.5
- ForeverAScone
- Newbie
- Posts: 22
- Joined: Sat May 23, 2020 8:08 pm
- Location: Under your bed
- Contact:
Re: Formatting the choice menu buttons?
Thank you, that helps Is there a way to make it so this formatting only applies for one part of the game, then the rest of the game it goes back to normal?rayminator wrote: ↑Wed May 27, 2020 5:52 pm hope this helps you I have put this <-- to show what you need to adjust the choice box
in gui.rpy look for
and in screens.rpy look forCode: Select all
## Choice Buttons ############################################################## ## ## Choice buttons are used in the in-game menus. define gui.choice_button_width = 600 define gui.choice_button_height = 60 define gui.choice_button_tile = False define gui.choice_button_borders = Borders(100, 5, 100, 5) define gui.choice_button_text_font = gui.text_font define gui.choice_button_text_size = 35 define gui.choice_button_text_xalign = 0.8 <-- this should move right & left define gui.choice_button_text_idle_color = "#f60fbd" define gui.choice_button_text_hover_color = "#fa69d6" define gui.choice_button_text_insensitive_color = "#444444"
Code: Select all
style choice_vbox: xalign 0.5 <-- this should move right & left ypos 405 <-- this should move up & down yanchor 0.5
Artist for hire!! Check out my post with details here!
viewtopic.php?f=61&t=65610
Portfolio here!
https://sprinklebara.crevado.com/artwork
viewtopic.php?f=61&t=65610
Portfolio here!
https://sprinklebara.crevado.com/artwork
-
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: Formatting the choice menu buttons?
here you can have two types but this is old so the possibility it might not work
viewtopic.php?f=8&t=39001&hilit=multipl ... le#p419071
here another one
viewtopic.php?t=20366
viewtopic.php?f=8&t=39001&hilit=multipl ... le#p419071
here another one
viewtopic.php?t=20366
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Formatting the choice menu buttons?
I haven't used it myself, but I believe you can use https://www.renpy.org/doc/html/style.ht ... Preference
Followed by a renpy style rebuild.
https://www.renpy.org/doc/html/style.ht ... le.rebuild
Followed by a renpy style rebuild.
https://www.renpy.org/doc/html/style.ht ... le.rebuild
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- Ulalaria
- Regular
- Posts: 150
- Joined: Thu May 29, 2014 11:45 pm
- Completed: Faust: Scene II, Queen At Arms, Rosewater
- Projects: The Owl-Woman Oracle
- Tumblr: meagantrott
- Contact:
Re: Formatting the choice menu buttons?
I'm gonna bump this because I'm trying to do the same thing - that is, have the choice menu styled differently in different scenes. I came across the threads rayminator linked to in my research, but those solutions no longer work since the RenPy 7 gui overhaul. And I'm concerned about using style.rebuild() because it sounds like the style changes will be undone if the player saves/loads during the choice?
- Ulalaria
- Regular
- Posts: 150
- Joined: Thu May 29, 2014 11:45 pm
- Completed: Faust: Scene II, Queen At Arms, Rosewater
- Projects: The Owl-Woman Oracle
- Tumblr: meagantrott
- Contact:
Re: Formatting the choice menu buttons?
Ooh, nevermind? I might have got something working just using renpy.set_style_preference..
An init block before the start label:
Then I set the preference just before the menu appears
An init block before the start label:
Code: Select all
init python:
renpy.register_style_preference("choicepos", "erika", style.choice_vbox, "xpos", 1380)
renpy.register_style_preference("choicepos", "christine", style.choice_vbox, "xpos", 30)
Code: Select all
nar_r "Here, make a decision..."
$ renpy.set_style_preference("choicepos", "erika")
menu:
"Decision 1":
pass
"Decision 2":
pass
nar_l "Make another decision..."
$ renpy.set_style_preference("choicepos", "christine")
menu:
"Decision 1":
pass
"Decision 2":
pass
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]