How can I change coordinates of in-game dialogue menus?

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
User avatar
tohtamish
Regular
Posts: 64
Joined: Thu Apr 29, 2010 4:56 am
Contact:

How can I change coordinates of in-game dialogue menus?

#1 Post by tohtamish » Fri Apr 30, 2010 3:36 pm

Can I put buttons with dialogue answers somewhere (for exemple, at bottom in NVL mode), or its always in the center of the screen?

Thanks!

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: How can I change coordinates of in-game dialogue menus?

#2 Post by Jake » Fri Apr 30, 2010 5:46 pm

tohtamish wrote:Can I put buttons with dialogue answers somewhere (for exemple, at bottom in NVL mode), or its always in the center of the screen?
Yes - you can customise pretty much everything about the way Ren'Py displays stuff, including where the menu options show up.

In general, you want to look at Properties and Styles for changing the appearance of things - it's probably best for you to read through that and come back with any questions you have rather than people trying to explain the whole subject to you in a forum post. I'd guess you probably want to find the container style that the menus are held inside and set its 'yalign' property to 1.0.

As a helper, you can hit Shift-I (IIRC) in-game and (so long as you have Developer Mode on) Ren'Py will report the styles of whatever you have the mouse over at the time - so to find out what styles to change to alter the positioning of menus, hold your mouse over a menu and hit Shift-I. (You can also get to this via the developer menu, Shift-D.)
Server error: user 'Jake' not found

User avatar
tohtamish
Regular
Posts: 64
Joined: Thu Apr 29, 2010 4:56 am
Contact:

Re: How can I change coordinates of in-game dialogue menus?

#3 Post by tohtamish » Sat May 01, 2010 8:00 am

Jake wrote:it's probably best for you to read through that
I have read that, but its too difficult for me, there isnt any ready solutions, so I posted new topic. :roll: Ok, will learn more.

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: How can I change coordinates of in-game dialogue menus?

#4 Post by Jake » Sat May 01, 2010 9:17 am

tohtamish wrote::roll:
If you'd read it already and didn't just need pointing to that, then you should have mentioned this salient fact in your initial post! :P

To expand upon what I said in my previous post: if you get to the point in a Ren'Py game where you're looking at a menu, then move the mouse over a choice and hit Shift-I, then you get something like this:

Code: Select all

Style Inspector
- Window : menu_window (600x62)
  - MultiBox : menu (600x62)
    - Button : menu_choice_button[u'choice text'] (600x30)
So there's a Window which contains a MultiBox which contains a Button; the Window is the top-level container for the menu, so that's the bit that we should move; its style is "menu_window". If you write this at the top of your script.rpy file:

Code: Select all

init:
    $ style.menu_window.yalign = 1.0
then it will set the menu position (via setting the 'yalign' property of the style of the Window that contains the whole menu) to right at the bottom of the screen, for example.

(Ideally, you should probably stick stuff like this in the options.rpy file; there's a load of commented-out style stuff around line 100 onwards, somewhere around there would be great - just remember that that's already a Python block, so you don't need the '$' sign at the beginning. Really, it could be anywhere in an init block, but it needs to be after the call to 'theme.roundrect' on line 46 of options.rpy.)




I'm pretty sure there's a setting somewhere that you can use to have your menus turn up in-line with the dialog in the box at the bottom, but I can't for the life of me remember what it is, and I can't find it offhand in the docs.
Server error: user 'Jake' not found

User avatar
tohtamish
Regular
Posts: 64
Joined: Thu Apr 29, 2010 4:56 am
Contact:

Re: How can I change coordinates of in-game dialogue menus?

#5 Post by tohtamish » Sat May 01, 2010 9:43 am

Of course I tried what u said, (I got "menu_choice_chosen") but I didnt know what to do with that, - so thanks alot!

Post Reply

Who is online

Users browsing this forum: No registered users