Side bars, custom screen help

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
Mord87
Regular
Posts: 26
Joined: Fri May 31, 2019 7:17 pm
Contact:

Side bars, custom screen help

#1 Post by Mord87 »

Hello!
I would like to make a game whit side bars on both side so I can put all the characters stats and other information on it. I found a game which has a perfect look. Anybody can help me how I can make a same? Thank You!
custom gui.png

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Side bars, custom screen help

#2 Post by Alex »

The simplest way is to create a stats screen (with 2 frames where all the stats will be placed) and just show this screen.
https://www.renpy.org/doc/html/screens.html

Ishigreensa
Newbie
Posts: 20
Joined: Sun Jul 06, 2014 8:11 am
Contact:

Re: Side bars, custom screen help

#3 Post by Ishigreensa »

I did this before:
You need to first, preplan how much of the area of the screen you want to use for each side screen, how much for your dialog box, and for your main picture:
For example, if you are using the 1920 X 1080 res that can now be used on most laptop and desk tops....
1920 could be devided into 0-450 for the left side, 450 to 1650 for your pic(1200 X 800) and then 1650 to 1920 (270 x 800) for your right side.
Divide it as you like.
It helped me to design the screen on paper first. maybe grid paper works best.

Next you will want to set up your variables or other important information to be displayed, and if possible, set up an example before start in init python:

for example:

init python:

indent() name = "April"
indent() age = 18

next, after you have set up your image files, but before the start label, set up your personal side screens.
screen my_left:
indent() tag menu
indent() vbox:
indent()indent()xpos 50
indent()indent()ypos 50
indent()indent()"Name: [name]":
indent()indent()indent()color = #"000000"
indent()indent()indent()size = 36
indent()indent()"Age: [age]":

Do the same with a screen that lets you choose names or whatever on the right side of the screen.
screen my_right:
()tag menu
()vbox:
()()xpos 1650
()()ypos 50
()()textbutton "help":

Then, when you are ready to show your screens, make sure you center your main scene.
label start:
() scene bedroom:
()() pos(450,0) ## puts your scene outside of your left side and as long as it is only (1200x800) as we discussed before, it should stay out of your right side panel, too.
() show screen my_left
() show screen my right
() show char
() c "this is how you do it."

and it should work for you.

adjust your

Ishigreensa
Newbie
Posts: 20
Joined: Sun Jul 06, 2014 8:11 am
Contact:

Re: Side bars, custom screen help

#4 Post by Ishigreensa »

in the above response I gave, you will see "Name: [name]" but it seems I missed the text just before that I mean to put there.
in screen language, you have to use text to tell the screen to put something in words on it.
in regular renpy, you just put " " around the words, but in screen language, that will not work.

Post Reply

Who is online

Users browsing this forum: Google [Bot], PyTom