I think using a table would be quite efficient, it just depends on what variables/attributes you want to use for each case (if statement).
You can also name attributes of a table as well.
Here is some random example, you can possibly use a for loop, depending on the situation.
mtable = { {id = 1, message = "This is the first one", gamestate = "Mode1"},
{id = 2, message = "This is the second one", gamestate = "Mode2"},
{id = 3, message = "This is the third one", gamestate = "Mode3"}
}
function on.paint(gc)
for g=1, #mtable do --up to mtable length
gc:drawString(mtable[g].message, 10, g*20, "top")
end
end
EDIT: Crap, over 3 month necropost!!! Just noticed.