Ok I got it working now and hopefully it's correct and that I understand gui customizing a bit more
I made several mistakes:
1. I needed to set the left/right/top/bottom_paddings (i use y/xpadding)
2. to see whats going on it was better to remove the background to see the results
3. I forgot to set the propper x/yminimum plus adding the margins values from the message box...
anyway I was wondering is there some recommendation about the coding style? Should I put everything in the options.rpy:
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 = "gui/message.png"
## Margin is space surrounding the window, where the background is not drawn.
style.window.left_margin = 12
style.window.right_margin = 12
style.window.top_margin = 0
style.window.bottom_margin = 5
## Padding is space inside the window, where the background is drawn.
style.window.left_padding = 30
style.window.right_padding = 150
style.window.top_padding = 19
style.window.bottom_padding = 5
## Adds a shadow one pixel to the right and one pixel down
style.say_dialogue.drop_shadow = [(2, 3)]
## This is the minimum height of the window, including the margins and padding.
style.window.yminimum = 143 # 138 (hight pixel) + 5 (bottom_margin)
## Name box for the two window variant
style.say_who_window.background = "gui/name.png" #180x47 pixel
style.say_who_window.xpos = 10
style.say_who_window.ypos = 57
style.say_who_window.xpadding = 0
style.say_who_window.ypadding = 0
style.say_who_window.xminimum = 204 # 180 (width image pixel) + 12 (left_margin) + 12 (right_margin)
style.say_who_window.yminimum = 52 # 47 (hight image pixel) + (5 bottom_margin)
## Center the text
style.say_label.xalign = 0.5
style.say_label.yalign = 0.5
## Adds a shadow one pixel to the right and one pixel down
style.say_label.drop_shadow = [(2, 3)]
## Unbold Name
style.say_label.bold = False
Or is it better to put it in the screens.pry just below "screen say" ?
Code: Select all
init -2:
style window:
background "gui/message.png"
left_margin 12
right_margin 12
top_margin 0
bottom_margin 5
left_padding 30
right_padding 150
top_padding 19
bottom_padding 5
yminimum 143 # 138 (hight pixel) + 5 (bottom_margin)
style say_who_window:
background "gui/name.png"
xpos 10
ypos 57
xpadding 0
ypadding 0
xminimum 204 # 180 (width pixel) + 12 (left_margin) + 12 (right_margin)
yminimum 52 # 47 (hight pixel) + (5 bottom_margin)
bold False
style say_dialogue:
drop_shadow [(2, 3)]
style say_label:
xalign 0.5 # Center the text
yalign 0.5 # Center the text
#text_align 0.5
drop_shadow [(2, 3)]
bold False