I have some trouble about positioning. I have some sort of messaging app, so I have my chats with people and, on the main screen of the app, a list with all chats. The thing is that I want to show a small preview of the last message of each chat below the name of each character, next to their picture, and I have something like this so far:
Code: Select all
for i in glist.chtd:
text i.name xpos 617 ypos cypos font "BRLNSR.TTF" size 20 color "#000000" at tpapp
if ".jpg" in i.chat[0]:
text "Photo" font "Lato-Regular.ttf" size 12 color "#1a2840" xpos 617 ypos cypos+25 at tpapp
else:
text i.chat[0] font "Lato-Regular.ttf" size 12 color "#545454" xpos 617 ypos cypos+25 xmaximum 200 ymaximum 20 at tpapp
imagebutton:
at tpapp
xpos 557
ypos cypos
idle i.picm
hover i.picmh
action Show("pmesc", girl=i)
$ cypos = cypos+60
How can I do that guys?
Also, how can I put this inside a viewport the easiest way? I'm having a hard time due to the particularities of the positions being variables and all...