Choice menu not repositioning

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
DewyNebula
Newbie
Posts: 11
Joined: Sun Apr 21, 2024 10:57 am
Contact:

Choice menu not repositioning

#1 Post by DewyNebula »

Hello, I'm trying to change how choice menus appear, and while I successfully did it in one project, I can't replicate it in the other. I want the choice box to be horizontal and low on the screen. Mine, however, is sticking to the top no matter what I do. Here are the edits I made in screens.rpy

Code: Select all

style choice_hbox is hbox
style choice_button is button
style choice_button_text is button_text

style choice_hbox:
    xalign 0.5
    yalign 0.9
    spacing 50
and in gui.rpy

Code: Select all

define gui.choice_button_width = None
define gui.choice_button_height = None
define gui.choice_button_tile = False
define gui.choice_button_borders = None
define gui.choice_button_text_font = gui.text_font
define gui.choice_button_text_size = gui.text_size
define gui.choice_button_text_xalign = 0.5
define gui.choice_button_text_idle_color = '#888888'
define gui.choice_button_text_hover_color = "#ffffff"
define gui.choice_button_text_insensitive_color = '#8888887f'

User avatar
m_from_space
Eileen-Class Veteran
Posts: 1004
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: Choice menu not repositioning

#2 Post by m_from_space »

DewyNebula wrote: Wed May 01, 2024 3:43 pm Hello, I'm trying to change how choice menus appear, and while I successfully did it in one project, I can't replicate it in the other. I want the choice box to be horizontal and low on the screen. Mine, however, is sticking to the top no matter what I do. Here are the edits I made in screens.rpy

Code: Select all

style choice_hbox is hbox
style choice_button is button
style choice_button_text is button_text

style choice_hbox:
    xalign 0.5
    yalign 0.9
    spacing 50
and in gui.rpy
The default choice screen you can find inside <screens.rpy> does not use an hbox, but it uses a vbox for ordering the choices. So you have to put the style definition inside the vbox statements, not any hbox one. You may have changed your screen, in that case, please post your choice screen code!

Code: Select all

# this style does already exist!
style choice_vbox:
    yalign 0.9

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]