- Aug 20, 2017
- 943
- 6,693
I have created a "quit" screen with yes no buttons:
When i change the allign here:
imagebutton:
idle "gui/yesno_no_idle.png"
hover "gui/yesno_no_hover.png"
action no_action
xalign 0.800
yalign 0.900
The buttons remain in the left top corner.
Code:
## Confirm screen ##############################################################
##
## The confirm screen is called when Ren'Py wants to ask the player a yes or no
## question.
##
## http://www.renpy.org/doc/html/screen_special.html#confirm
screen confirm(message, yes_action, no_action):
## Ensure other screens do not get input while this screen is displayed.
modal True
zorder 200
style_prefix "confirm"
add "gui/yesno_ground.jpg"
frame:
vbox:
xalign .5
yalign .002
spacing 30
label _(message):
style "confirm_prompt"
xalign 0.5
hbox:
imagebutton:
idle "gui/yesno_yes_idle.png"
hover "gui/yesno_yes_hover.png"
action yes_action
xalign 0.300
yalign 0.900
imagebutton:
idle "gui/yesno_no_idle.png"
hover "gui/yesno_no_hover.png"
action no_action
xalign 0.800
yalign 0.900
## Right-click and escape answer "no".
key "game_menu" action no_action
style confirm_frame is gui_frame
style confirm_prompt is gui_prompt
style confirm_prompt_text is gui_prompt_text
style confirm_button is gui_medium_button
style confirm_button_text is gui_medium_button_text
style confirm_frame:
background Frame([ "gui/yesno_ground.jpg"], gui.confirm_frame_borders, tile=gui.frame_tile)
padding gui.confirm_frame_borders.padding
xalign .5
yalign .5
style confirm_prompt_text:
text_align 0.5
layout "subtitle"
style confirm_button:
properties gui.button_properties("confirm_button")
style confirm_button_text:
properties gui.button_text_properties("confirm_button")
imagebutton:
idle "gui/yesno_no_idle.png"
hover "gui/yesno_no_hover.png"
action no_action
xalign 0.800
yalign 0.900
The buttons remain in the left top corner.