Something like Fixed(img, img2, xalign=0.5, yalign=0.5, xysize=(326,217)) doesn't work, but the documentationleads me to believe it should?
I found a workaround by using livecomposite to manually center the alphablend image, but that seems kinda hacky. I wondered if I'm missing something? This is not super critical obviously I just want some education.
Code: Select all
screen file_picker(current_screen, trans):
frame:
...
# Display ten file slots, numbered 1 - 10.
for i in range(1, columns * rows + 1):
$ num = "% 2s" % FileSlotName(i, columns * rows)
$ ss = AlphaBlend("images/save-file-alpha.png",Solid("#0000"), LiveCrop((95,45,300,200),FileScreenshot(i)), alpha=True)
# Each file slot is a button.
button:
action FileAction(i)
idle_background Fixed(Null(width=326, height=217), ss, Text(str(num), color=(255,255,255,80), size=200, xalign=0.35), xalign=0.5, yalign=0.5, xysize=(326,217))
selected_idle_background Fixed(LiveComposite((326,217), (0,0), "images/gui/game_selected.png", (13,8), ss), Text(str(num), color=(255,255,255,80), size=200, xalign=0.35), xalign=0.5, yalign=0.5, xysize=(326,217))
hover_background Fixed(LiveComposite((326,217), (0,0), "images/gui/game_hover.png", (13,8), ss), Text(str(num), color=("#FFF"), size=200, xalign=0.35), xalign=0.5, yalign=0.5, xysize=(326,217))