Placing buttons on different parts of the screen?

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
User avatar
Ryu-Gi
Regular
Posts: 38
Joined: Fri Apr 05, 2013 9:26 pm
Contact:

Placing buttons on different parts of the screen?

#1 Post by Ryu-Gi » Mon Mar 16, 2015 12:46 pm

Was wondering, In Ren'Py, is it possible to place buttons for choices on specific parts of the screen instead of the middle?

Like, say for example you're presented with a picture of a room, and you have the option of picking up one of the items in it. The buttons would be places near the object that it selects. Is it doable, and may I have a sample of the code for it?
Feeling much better lately!

Now working on: "Nekomimi in Boots"
Finished Games: "A Date with Markiplier: The Game"

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Placing buttons on different parts of the screen?

#2 Post by trooper6 » Mon Mar 16, 2015 2:54 pm

You want position style properties with are detailed here: http://www.renpy.org/doc/html/style_pro ... properties
Specifically you want to use the xalign and yalign properties.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
xavimat
Eileen-Class Veteran
Posts: 1458
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: Placing buttons on different parts of the screen?

#3 Post by xavimat » Mon Mar 16, 2015 6:01 pm

For the specific use case, I'd suggest making a new screen, not using the "menu".
Take a look at this example: http://lemmasoft.renai.us/forums/viewto ... 51&t=20541

You'll need to know how screens work, though.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Post Reply

Who is online

Users browsing this forum: No registered users