Formatting the choice menu buttons?

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
ForeverAScone
Newbie
Posts: 13
Joined: Sat May 23, 2020 8:08 pm
Projects: Unnamed over the top magical boy game ✨
Location: Under your bed
Contact:

Formatting the choice menu buttons?

#1 Post by ForeverAScone » Wed May 27, 2020 3:35 pm

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 :)
Wazzup, just a newbie who asks lots of questions ✨

User avatar
rayminator
Veteran
Posts: 436
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Formatting the choice menu buttons?

#2 Post by rayminator » 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

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"
and in screens.rpy look for

Code: Select all

style choice_vbox:
    xalign 0.5 <-- this should move  right & left
    ypos 405 <-- this should move up & down
    yanchor 0.5
when I try to help someone I point them into 2 direction what's right and wrong so they can learn how to

User avatar
ForeverAScone
Newbie
Posts: 13
Joined: Sat May 23, 2020 8:08 pm
Projects: Unnamed over the top magical boy game ✨
Location: Under your bed
Contact:

Re: Formatting the choice menu buttons?

#3 Post by ForeverAScone » Wed May 27, 2020 8:28 pm

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

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"
and in screens.rpy look for

Code: Select all

style choice_vbox:
    xalign 0.5 <-- this should move  right & left
    ypos 405 <-- this should move up & down
    yanchor 0.5
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?
Wazzup, just a newbie who asks lots of questions ✨

User avatar
rayminator
Veteran
Posts: 436
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: Formatting the choice menu buttons?

#4 Post by rayminator » Wed May 27, 2020 10:07 pm

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
when I try to help someone I point them into 2 direction what's right and wrong so they can learn how to

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 2982
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Formatting the choice menu buttons?

#5 Post by Imperf3kt » Wed May 27, 2020 10:41 pm

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
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Free Android GUI - Updated occasionally

Post Reply

Who is online

Users browsing this forum: Google [Bot], renardjap