Hi all,
I have a leader board system set up so that users can see how their scores compare to their friends. It works as it should, names, scores etc are fetched via PHP and the ordering is also correct.
However I would also like to have each users profile picture next to their name, to make it easier for the user to see who each person is at a glance - but I’m not too sure how to go about it.
I’m using a widget table view to display the leaderboard, and in an ‘onRender’ function I am setting the text for each cell, and so I presumed the image would be set there also.
I am calling loadRemoteImage in the onRender function as such (where “thisID” is the Facebook ID for that particular user - I’ve printed this to make sure it’s correct for each cell):
display.loadRemoteImage("http://graph.facebook.com/".. thisID .."/picture",
"GET",
showImage,
"friend"..thisID..".png",
system.TemporaryDirectory, \_W / 20,row.height \* 0.5 )
Instead of the pictures rendering in the cell, they all render in the top left corner. It seems that they are printing in the correct x position (width / 20), and I’m guessing they are all being positioned one on top of the other at 0 +(row.height * 0.5).
How would I use this to properly display the images in a cell? My understanding is that calling loadRemoteImage saves the file (as “friend”…thisID…".png" in the Temp Dir I woud assume), can I save the image WITHOUT displaying it immediately - and then use the saved images in a newImageRect within the cell?
Apologies if it’s really obvious, but I haven’t had cause to use loadRemoteImage yet.
Thanks in advance everyone
[import]uid: 84115 topic_id: 28035 reply_id: 328035[/import]