Page 1 of 1

Differentiating Left/Right Dialogue Windows Using Styles?

Posted: Sun Jul 25, 2021 10:35 am
by GlitchyReal
I'm trying to emulate a Hotel Dusk-style text window where a dialogue box appears on the left for one character and, when finished speaking, a new box appears on the right for the other character.

I've been utilizing (multiple=2) but this (as far as I can tell) disallows the use of CPS scroll and other kinds of limitations.

I think it's possible to set a new style for the say_window and apply it on a per-character basis and then just define new characters depending on what side of the screen they need to be. (eg: Eileen_HappyL, Eileen_HappyR, etc.)

I'm trying to use something basic like this:

Code: Select all

style rightwindow is say_window:
    xpos 1425
    ypos 990

style leftwindow is say_window:
    xpos 970
    ypos 990
  
Assuming this is even the correct approach, I don't have any idea how to apply it to a character or how to call it or anything. As it is, it's a say_window with the changes I need an nowhere to go.

Can anyone help?

Re: Differentiating Left/Right Dialogue Windows Using Styles?

Posted: Sun Jul 25, 2021 11:25 am
by Ocelot
https://www.renpy.org/doc/html/dialogue ... er-objects
Styling Text and Windows. Keyword arguments beginning with who_, what_, and window_ have their prefix stripped, and are used to style the character name, the spoken text, and the window containing both, respectively.

[...]

The style applied to the character name, spoken text, and window can also be set this way, using the who_style, what_style, and window_style arguments, respectively.
Example:

define eR = Character("Eileen", window_style="Eileen_right")

Re: Differentiating Left/Right Dialogue Windows Using Styles?

Posted: Mon Jul 26, 2021 9:07 am
by GlitchyReal
Thank you again, Ocelot. I’ll give it a shot!

EDIT: This worked 100%, thought I'd mention.