Hope someone far cleverer than me can help!
I'm creating a new layout for use on my living room box (so widescreen and a little snazzier than my usual ones!)
I had an idea to create a cool filter select menu where you can press a button and move around a grid of available filters, grouped in rows - so my top row might be "all games','most played','favourites' and the next row might be arcade - 'mame','model 3','teknoparrot' etc
I can push the filters into an array fine:
local s_list = ["Top","Arcade"];
local f_list = [];
f_list.append(["Top","All Games"]);
f_list.append(["Top","Favourites"]);
f_list.append(["Top","Most Played"]);
f_list.append(["Arcade","Classics"]);
f_list.append(["Arcade","Model 2"]);
etc
But what I would like to do, is generate surfaces on the fly based on the row that they appear in. I'd then like to reference those surfaces by their generated name so I can scroll them independently. So in the above example I would have a surface called "Top" and another surface called "Arcade"
So something like this:
foreach (s in s_list) {
#Generate surface based on s value at posiition y
foreach (f in f_list) {
# Add items to above surface at position x
# x=x+200
}
y=y+200
}
I could obviously hard code all the filters in, but this would be pretty long-winded and not very flexible.
Is there a way this can be done?