Page 1 of 1

Placing Dialog Boxes anywhere on the screen

Posted: Wed Apr 26, 2017 10:55 am
by Ragnaor
Hi,

I'm currently doing a visual novel on Ren'py as part of my studies as a game designer.

I would like to know how to place dialog boxes anywhere on the screen. (We've been struggling for a few days)

For example, for added dynamism, we would like the dialog boxes to appear directly on the character (mid screen), or basically ,anywhere else besides the classical bottom of the screen .

Moreover, is it possible to display a dialog box without defining a character? ( one that would still react to the player clicking)

Thanks in advance!

Re: Placing Dialog Boxes anywhere on the screen

Posted: Thu Apr 27, 2017 6:49 pm
by renpic
Ragnaor wrote:Hi,

I'm currently doing a visual novel on Ren'py as part of my studies as a game designer.

I would like to know how to place dialog boxes anywhere on the screen. (We've been struggling for a few days)

For example, for added dynamism, we would like the dialog boxes to appear directly on the character (mid screen), or basically ,anywhere else besides the classical bottom of the screen.
Then you should look into gui.rpy, particularly at this line:

Code: Select all

define gui.textbox_yalign = 1.0
You can change it to 0.0, and the textbox will be at the top of the screen; or 0.5, to have it right in the middle, etc.
Moreover, is it possible to display a dialog box without defining a character? ( one that would still react to the player clicking)
You mean, like narrator lines?

That is simply done with something like this:

Code: Select all

 "Hello, world."

Re: Placing Dialog Boxes anywhere on the screen

Posted: Thu Apr 27, 2017 7:05 pm
by renpic
renpic wrote:You mean, like narrator lines?
Or maybe you were thinking about something like this:

Code: Select all

show text "Hello World!" at truecenter 

Re: Placing Dialog Boxes anywhere on the screen

Posted: Fri Apr 28, 2017 4:00 am
by Ragnaor
Ok! Thanks a lot for your answers ! Back to work !

Re: Placing Dialog Boxes anywhere on the screen

Posted: Fri Apr 28, 2017 1:54 pm
by renpic
renpic wrote: Then you should look into gui.rpy, [...]
You can change it [...]
BTW, there is no need to edit gui.rpy, you should be able to do it just from script.rpy. Add at the beginning:

Code: Select all

init:                                                                           
    python:                                                                     
        gui.textbox_yalign = 0.0
and that's it! :smile: