This is the code from chars_list screen.
hbox:
style_group "content"
spacing 14
pos (17, 15)
for l in chars_list:
vbox:
spacing 14
for c in l:
$ char_profile_img = c.show('portrait', resize=(98, 98), cache=True)
$ img = "content/gfx/frame/ink_box.png"
button:
idle_background Frame(Transform(img, alpha=0.4), 10 ,10)
hover_background Frame(Transform(img, alpha=0.9), 10 ,10)
xysize (470, 115)
action Return(['choice', c])
I need to build similar screen for a few characters.
"for l in chars_list" is the loop for characters, l = character. So far so good.
But then we have another loop "for c in l", where l is a character already, so it kinda starts to operate with letters. When I copy this code to another place, it says string cannot have show method. And yet this code works at the chars_list screen.
I'm confused how does it work in the first place