And now with xcenter and ycenter:
As you can see, they're flinging the screen off to the upper-left instead of centering it like they're supposed to. I'm finding the same issue if I try to use xalign and yalign instead. Not sure why it would be happening. Included below is all the code I'm using for the screen:
Code: Select all
screen item_view(inventory, item):
#frame contains all sections of item popup
#and background
frame:
xcenter
ycenter
left_padding 0
top_padding 0
background "item_view.png"
#name of item
fixed:
xpos 16 ypos 16
xoffset 4
yoffset 4
xminimum 704 xmaximum 704
yminimum 64 ymaximum 64
text "[item[0].name]" font "bandmess.ttf" size 54 line_leading 0 outlines [(0, "160B02", 5, 5),(3, "000000", 0, 0)]
#qty of item
fixed:
xpos 716 ypos 16
xminimum 90 xmaximum 90
yminimum 64 ymaximum 64
text "x[item[1]]" font "bandmess.ttf" size 54 line_leading 4 text_align 1.0 outlines [(0, "160B02", 5, 5),(3, "000000", 0, 0)]
#item icon
fixed:
xpos 16 ypos 96
#attempts to load icon for the item being displayed
#if there is no icon available, loads a more generic backup icon instead
if item[0].icon:
python:
if renpy.loadable(item[0].icon):
dispimage = item[0].icon
else:
dispimage = item[0].backupicon
image dispimage
#full flavor text for item
fixed:
xpos 288 ypos 96
xmaximum 480 ymaximum 144
xoffset 12
yoffset 8
text "[item[0].fulldesc]" size 20 outlines [(2, "000000", 0, 0)]
#describes the item's effect
fixed:
xpos 16 ypos 386
xmaximum 240 ymaximum 64
#xcenter
#ycenter
text "[item[0].effectdesc]" size 16 outlines [(2, "000000", 0, 0)]
# trade, combat, and food values
fixed:
xpos 288 ypos 256
xmaximum 256 ymaximum 176
xoffset 12
yoffset 8
vbox:
hbox:
text "TRADE VALUE:" size 20 outlines [(2, "000000", 0, 0)]
text "[item[0].value]" size 20 outlines [(2, "000000", 0, 0)]
hbox:
text "COMBAT VALUE:" size 20 outlines [(2, "000000", 0, 0)]
text "[item[0].comvalue]" size 20 outlines [(2, "000000", 0, 0)]
hbox:
text "FOOD VALUE:" size 20 outlines [(2, "000000", 0, 0)]
text "[item[0].nutvalue]" size 20 outlines [(2, "000000", 0, 0)]
# list of crafting types
fixed:
xpos 560 ypos 256
xmaximum 224 ymaximum 176
xoffset 12 yoffset 8
vbox:
for crafttype in item[0].crafttypes:
text "[crafttype]" size 20 outlines [(2, "000000", 0, 0)]