Trying to build a simple list routine so I can alter the selected game height.
Only lists the first 9 games. Using up/down changes the preview image appropriately but the list doesn't change.
// Layout by cools / Arcade Otaku
// Layout User Options
class UserConfig {
</ label="Preview Image", help="Choose snap/video snap, title, flyer or none.", options="snap,video,title,flyer,none" /> preview_image = "snap";
}
local my_config = fe.get_config();
// Layout Constants
// Font found on 9031.com
fe.layout.font="Arcade-Regular"
local rot=(fe.layout.base_rotation+fe.layout.toggle_rotation)%4;
local flw=fe.layout.width;
local flh=fe.layout.height;
switch (rot) {
case RotateScreen.Right:
case RotateScreen.Left:
fe.layout.width=flh;
fe.layout.height=flw;
flw=fe.layout.width;
flh=fe.layout.height;
break;
}
// Preview image
local preview=fe.add_artwork (my_config["preview_image"],0,0,flw,flh/3);
// List
local lbx=0;
local lby=flh/3;
local lbw=flw;
local lbh=flh-lby;
local itn=9;
local ith=lbh/itn;
lby+=(ith*(itn/2));
for (local i=(itn/2)*-1;i<(itn/2);i+=1){
if (i==0) {
fe.add_text(fe.game_info (Info.Title),lbx,lby+(ith*i)-5,lbw,ith+10);
}
else {
fe.add_text(fe.game_info (Info.Title,i),lbx,lby+(ith*i),lbw,ith);
}
}
Actually, just doing this doesn't work as I'd expect:
fe.add_text(fe.game_info (Info.Title),0,0,fe.layout.width,fe.layout.height/25);
Even throwing the latter part alone into a "local game=" statement fails for it to update.