Apparently I can´t seem to get this to work, even though I´ve spent hours researching and trying around, changing my code a few million times XD
I´m using a two-window version of the say_window, with the say_who_window ontop of it and want to center the Character name within the say_who_window so that I can use a bigger background image for different sized Names without having to realign them every time.
Tried using xalign 0.5 as I´ve read countless of times, but no matter where I place it, it doesn´t move the Text to the right position
in scripts.rpy:
Code: Select all
define l = Character('Lucienne', image='lucienne', show_two_window=True)
Code: Select all
style say_label:
xalign 0.5
text_align 0.5
screen say:
# Defaults for side_image and two_window
default side_image = None
default two_window = True
# Decide if we want to use the one-window or two-window variant.
if not two_window:
# The one window variant.
window:
id "window"
has vbox:
style "say_vbox"
if who:
text who id "who"
text what id "what"
else:
fixed:
window:
id "window"
has vbox:
style "say_vbox"
text what id "what"
if who:
window:
ypos 415
style "say_who_window"
text who:
id "who"
# If there's a side image, display it above the text.
if side_image:
add side_image
else:
add SideImage() xalign 0.0 yalign 1.0
# Use the quick menu.
# use quick_menu
Code: Select all
style.window.background = "images/Textbox3.png"
style.say_who_window.background = "images/Namebox.png"
style.say_who_window.left_margin = 80
style.say_who_window.top_padding = 5
#style.window.right_margin = 0
#style.window.top_margin = 0
#style.window.bottom_margin = 0
style.say_window.left_padding = 90
style.say_window.right_padding = 90
style.say_window.top_padding = 30
style.say_window.bottom_padding = 30
style.say_label.outlines = [(1, "#000", 0, 0)]
style.say_label.color = "#fff"
style.say_label.font = "VINERITC.ttf"
style.say_label.bold = False
style.say_label.size = 25
style.say_dialogue.outlines = [(1, "#fff", 0, 0)]
style.default.font = "HTOWERT.ttf"
style.default.size = 22
style.default.color = "#000000"