I want to positioning choice buttons horizontally

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
civcommander
Newbie
Posts: 6
Joined: Tue Dec 19, 2017 8:15 am
Contact:

I want to positioning choice buttons horizontally

#1 Post by civcommander »

Hi together,

I want to display my choice buttons side by side for the whole game but i didnt found anything in gui.rpy and screens.rpy. I can change position, size etc. and things like this...


Maybe somebody knows a solution?

thanks for your help!

User avatar
zankizuna
Veteran
Posts: 416
Joined: Fri May 04, 2012 2:20 am
Completed: Monochrome Valentine
Projects: Softwar
Deviantart: raseru09
itch: ZanKizuna
Location: Manilaaaaaaaa
Contact:

Re: I want to positioning choice buttons horizontally

#2 Post by zankizuna »

use hbox!

Code: Select all

screen myscreen:
    hbox:
       xalign 0.5 yalign 0.5
       textbutton "myfirstbutton.png" action Return()
       textbutton "mysecondbutton.png"  action Return()

This shows two buttons in the middle.

User avatar
zankizuna
Veteran
Posts: 416
Joined: Fri May 04, 2012 2:20 am
Completed: Monochrome Valentine
Projects: Softwar
Deviantart: raseru09
itch: ZanKizuna
Location: Manilaaaaaaaa
Contact:

Re: I want to positioning choice buttons horizontally

#3 Post by zankizuna »

actually , go replace vbox in screens.rpy/screen choice, into hbox.

civcommander
Newbie
Posts: 6
Joined: Tue Dec 19, 2017 8:15 am
Contact:

Re: I want to positioning choice buttons horizontally

#4 Post by civcommander »

Hello,

thank you for your answer, it works... (vbox = vertical, hbox = horizontal...) :D

have a nice day!!

Post Reply

Who is online

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