Page 1 of 1
Trying to customize the namebox position, three variants.
Posted: Sat Nov 08, 2014 4:00 pm
by themocaw
What I am doing:
Using the two-box "say" system to have a separate window for the character name above the text box.
What I want to do:
Move the "name" box to left, right, or center depending on the character's position on the screen.
EXAMPLE
Beefcake
"As the beefcake I'm standing on the left."
Bishonen
"As the bishonen, I'm standing on the right."
Waifu
"And the Waifu is standing in the center."
-----
Any thoughts on how I could make this work? I tried using the method detailed here:
http://renpyhandbook.tumblr.com/post/88 ... characters but I kept ending up with "who_window_style is undefined" errors.
Re: Trying to customize the namebox position, three variants
Posted: Sat Nov 08, 2014 6:53 pm
by Milkymalk
If you post your code for this, more people will look at it

Re: Trying to customize the namebox position, three variants
Posted: Sun Nov 09, 2014 6:57 am
by Tayruu
I had problems trying to just get text in the dialogue window to be aligned differently at all for a while, especially with different Characters. What I found was it was something to do with the style of say_window, followed by a different style for certain cases, though I'm not sure what specifically...
Checking that link it's possible the code is slightly out of date, I have a Character that uses what_style="dtitle", window_style="dwindow", so conversely maybe you need to specify who_style="" and refer to the style you want to use. I haven't altered the say screen though, like that asks.
Re: Trying to customize the namebox position, three variants
Posted: Sun Nov 09, 2014 11:17 am
by Kia
I did this a while ago and some time after that I found another way to do the same. lemme share the code and see if you can use it.
first way: (keep in mind I did this just when I started with renpy so it's messy)
in options
Code: Select all
#########################################
## These settings let you customize the window containing the
## dialogue and narration, by replacing it with an image.
## The background of the window. In a Frame, the two numbers
## are the size of the left/right and top/bottom borders,
## respectively.
style.window.background = Frame("items/ghab.png", 25, 25)
style.button.background = Frame("items/men.png", 25, 25)
## Margin is space surrounding the window, where the background
## is not drawn.
style.window.left_margin = 30
style.window.right_margin = 30
# style.window.top_margin = 6
style.window.bottom_margin = 5
## Padding is space inside the window, where the background is
## drawn.
style.window.left_padding = 10
style.window.right_padding = 10
style.window.top_padding = 10
style.window.bottom_padding = 10
style.window.xfill=False
#style.window.xpos = 1.0
style.window.xalign = 0.0
## This is the minimum height of the window, including the margins
## and padding.
style.window.yminimum = 30
style.say_who_window.background = None
style.say_who_window.bottom_margin = -25
style.say_label.outlines=[(3, "#000055", 0, 0)]
style.say_who_window.xfill=True
#style.say_who_window.xfill = False
characters
Code: Select all
define narrator = Character(None,what_text_align=0.5,window_xalign=0.5,window_yalign=0.5, what_outlines=[(3, "#000000", 2, 2), (3, "#777777", 0, 0)], what_color="#ffffff")
define gen = Character('Gen', show_two_window=True, window_background=Frame("items/frmgen.png", 10, 10),color="#0066ff",what_color="#ffffff")
define lol = Character('Lola',show_two_window=True,window_xalign=1.0,who_xalign=1.0,window_background=Frame("items/frmlol.png", 10, 10), color="#ffff00", what_color="#000000")
style.say_who_window.xfill=True is the line that makes it possible if I recall correctly
and the other way is:
http://lemmasoft.renai.us/forums/viewto ... 32&t=28567