How to change the position of the 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
redness
Newbie
Posts: 14
Joined: Sun Jan 17, 2016 2:08 pm
Contact:

How to change the position of the menu buttons?

#1 Post by redness » Sun Jan 17, 2016 2:14 pm

Instead of the default way menu buttons show up how do I make it appear somewhere else besides the center of the screen like so:

Image

The menu buttons are over on the upper right hand corner rather than the usual center. How does one do this?

User avatar
Keinart
Regular
Posts: 133
Joined: Sun May 13, 2012 8:28 pm
Completed: One Thousand Lies
Projects: Lotus Reverie
Organization: Keinart Lobre
Tumblr: keinart
itch: keinart
Location: Spain
Contact:

Re: How to change the position of the menu buttons?

#2 Post by Keinart » Sun Jan 17, 2016 2:57 pm

Go to the screens.rpy, look for the choice section. There you should have the window style with the default xalign 0.5 and yalign 0.5. Change it for whatever position you want, in this case it would be probably something like xalign 0.8 and yalign 0.2 or so.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: How to change the position of the menu buttons?

#3 Post by Donmai » Sun Jan 17, 2016 3:30 pm

You can also change the buttons size by editing these lines

Code: Select all

    style menu_choice_button is button:
        xminimum int(config.screen_width * 0.75)
        xmaximum int(config.screen_width * 0.75)
And I guess that "compliment her looks" would be the wiser option for a first move... :lol:
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

redness
Newbie
Posts: 14
Joined: Sun Jan 17, 2016 2:08 pm
Contact:

Re: How to change the position of the menu buttons?

#4 Post by redness » Sun Jan 17, 2016 8:39 pm

Thank you! Very helpful. One more question

In the game above the choices don't just appear in one place. Sometimes they appear to the left of the screen sometimes even appear scattered around the screen to let the user choose a more specific choice based on the objects shown on the screen.

How do I do this?

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: How to change the position of the menu buttons?

#5 Post by Donmai » Sun Jan 17, 2016 9:06 pm

I believe you're talking about two different things. The "scattered" menus probably are imagemaps: http://www.renpy.org/doc/html/screens.h ... statements
If you modify the choice screen, then it should be possible to pass variables that will change the window xalign and yalign values. I'm not the best person to write this kind of thing, though.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

redness
Newbie
Posts: 14
Joined: Sun Jan 17, 2016 2:08 pm
Contact:

Re: How to change the position of the menu buttons?

#6 Post by redness » Sun Jan 17, 2016 10:19 pm

Thank you again! One more question:

As you can tell I am very new at this. Will I get banned if I spam the Question section with loads of questions? Because I currently have a LOAD of questions but I don't want to fill the section with my threads.

User avatar
Keinart
Regular
Posts: 133
Joined: Sun May 13, 2012 8:28 pm
Completed: One Thousand Lies
Projects: Lotus Reverie
Organization: Keinart Lobre
Tumblr: keinart
itch: keinart
Location: Spain
Contact:

Re: How to change the position of the menu buttons?

#7 Post by Keinart » Mon Jan 18, 2016 5:47 am

Well it's recommended to first use the search. Make sure it's not something someone as asked before and then once you are totally lost can come to make a question.

Post Reply

Who is online

Users browsing this forum: No registered users