[Pipmak-Devel] getscreenmodes ideas
Status: Alpha
Brought to you by:
cwalther
From: Andrea V. <and...@gm...> - 2007-07-24 06:51:40
|
Hi Christian, Thank you to have included in Pipmak my little contribution! About the getscreenmodes: I have used the array structure {{w=1024,h=768},...} because I thought that it was little simpler for the user who aren't a very "lua expert". I believe that the use of "unpack" could confuse newbies: pipmak.setscreensize(unpack(modes[i]) What do you think about to use your syntax but adding another calling schema to setscreensize: setscreensize(boolean) setscreensize(number,number) setscreensize(table) the last syntax should permit to write: pipmak.setscreensize(modes[i]) and unpack will be performed by setscreensize itself. remain the use of unpack, if I want to read (for testing) modes: w,h=unpack(modes[i]) or w=modes[i][0] h=modes[i][1] another idea: n=pipmak.getscreenmodes() --return number of possible modes w,h=pipmak.screenmode(i) --return modes i in this way I haven't to use an array, if I use a wrong "i" (i.e.: n=10 and I use i=12 or i=-1) pipmak.screenmode(i) will return the current screensize so I could write: pipmak.setscreensize(pipmak.screenmode(i)) What do you think? Bye Andrea |