Advanced interface customization (nested layouts)

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
titine
Newbie
Posts: 3
Joined: Fri Mar 01, 2013 3:50 pm
Contact:

Advanced interface customization (nested layouts)

#1 Post by titine »

Hi all,

I searched on the wiki since few days to make this but I don't find what I want (It's maybe under my eyes but you know...), so I come here to have some help ^^.

I don't know if it's possible with Ren'py but I would create an advanced interface :

The main layout in large size like 640x480 with some buttons.

But with the game in smaller dimensions, like 320x240.

I know it's maybe not clear so I maked a schema :
Image


Do you think it's possible? And if yes, how?


Thx to read this message, and sorry for my english, I'm french.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Advanced interface customization (nested layouts)

#2 Post by xela »

I have somewhat limited knowledge of RenPy but I can tell you without any doubt that this is possible and fairly easy to do.

Text input and two red buttons in red window are self-explanatory.

As for the blue window, if it was me making this (again with somewhat limited knowledge), I would create a new screen, new style for text window, blue buttons and position all of that inside of that screen as it is on your picture.

And by the way, this is not an advanced interface, game I am working on right now prolly has more complicated interfaces than this, some commercial games do outright remarkable things with RenPy.


Edit:
This should do exactly what you want it to: https://dl.dropbox.com/u/43556362/game.rar
Like what we're doing? Support us at:
Image

titine
Newbie
Posts: 3
Joined: Fri Mar 01, 2013 3:50 pm
Contact:

Re: Advanced interface customization (nested layouts)

#3 Post by titine »

Thx for your quick reply, it's perfect :)

Yeah it's for sure really basic interface system for you, but for me it's already quite advanced :p

So thanks a lot for your example script I will base my work on it! :)

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Advanced interface customization (nested layouts)

#4 Post by xela »

titine wrote:Thx for your quick reply, it's perfect :)

Yeah it's for sure really basic interface system for you, but for me it's already quite advanced :p

So thanks a lot for your example script I will base my work on it! :)
No problem, people've been helping me on these forums as well, I though I'll pass it on. Good luck with your game/program.
Like what we're doing? Support us at:
Image

titine
Newbie
Posts: 3
Joined: Fri Mar 01, 2013 3:50 pm
Contact:

Re: Advanced interface customization (nested layouts)

#5 Post by titine »

Oh one more question (sorry :s) the menu Choice1, Choice2 that you made in game screen, is made with button.

But that's call to be changed very often in my game/program, do you think it's possible to change that by a simple :

menu:
"action1":
...
"action2":
...

But resized at the game screen (320,240) ?

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Advanced interface customization (nested layouts)

#6 Post by xela »

titine wrote:Oh one more question (sorry :s) the menu Choice1, Choice2 that you made in game screen, is made with button.

But that's call to be changed very often in my game/program, do you think it's possible to change that by a simple :

menu:
"action1":
...
"action2":
...

But resized at the game screen (320,240) ?

You asked for buttons, not menu :)

It's as simple as repositioning menu and editing it's button properties. I've enabled modal on menu screen because you'll get 'out of range' errors if other buttons are clicked while menu is up. Also keep in mind that like I've said in previous posts, best way to approach your situation is to create new text window, code right now simply repositions default one, which will work fine, unless you try to modify it (like enabling two window setup) which might mess up the layout.

This was tested with 6.15.0:

https://dl.dropbox.com/u/43556362/game.rar
Like what we're doing? Support us at:
Image

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]