Page 1 of 1

Choice menu not repositioning

Posted: Wed May 01, 2024 3:43 pm
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'

Re: Choice menu not repositioning

Posted: Thu May 02, 2024 3:15 am
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