Advertisement
Hendrix000007

ratio handeling in config file

Oct 21st, 2014
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.19 KB | None | 0 0
  1. -- CONFIG.LUA FILE---
  2. ---------------------
  3.  
  4. if string.sub(system.getInfo("model"),1,4) == "iPad" then
  5.     print( system.getInfo("model") )
  6.     application =
  7.     {
  8.         content =
  9.         {
  10.             width = 360,
  11.             height = 480,
  12.             scale = "letterBox",
  13.             xAlign = "center",
  14.             yAlign = "center",
  15.             imageSuffix =
  16.             {
  17.                 [""] = 1.5,
  18.                 ["-hd"] = 3.0,
  19.             },
  20.         },
  21.     }
  22.  
  23. elseif string.sub(system.getInfo("model"),1,2) == "iP" and display.pixelHeight > 960 then
  24.     print( system.getInfo("model") )
  25.     application =
  26.     {
  27.         content =
  28.         {
  29.             width = 320,
  30.             height = 568,
  31.             scale = "letterBox",
  32.             xAlign = "center",
  33.             yAlign = "center",
  34.             imageSuffix =
  35.             {
  36.                 [""] = 1.5,
  37.                 ["-hd"] = 3.0,
  38.             },
  39.         },
  40.     }
  41.  
  42. elseif string.sub(system.getInfo("model"),1,2) == "iP" then
  43.     print( system.getInfo("model") )
  44.     application =
  45.     {
  46.         content =
  47.         {
  48.             width = 320,
  49.             height = 480,
  50.             scale = "letterBox",
  51.             xAlign = "center",
  52.             yAlign = "center",
  53.             imageSuffix =
  54.             {
  55.                 [""] = 1.5,
  56.                 ["-hd"] = 3.0,
  57.             },
  58.         },
  59.     }
  60. elseif display.pixelHeight / display.pixelWidth > 1.72 then
  61.     print( system.getInfo("model") )
  62.     application =
  63.     {
  64.         content =
  65.         {
  66.             width = 320,
  67.             height = 570,
  68.             scale = "letterBox",
  69.             xAlign = "center",
  70.             yAlign = "center",
  71.             imageSuffix =
  72.             {
  73.                 [""] = 1.5,
  74.                 ["-hd"] = 3.0,
  75.             },
  76.         },
  77.     }
  78. else
  79.     print( system.getInfo("model") )
  80.     application =
  81.     {
  82.         content =
  83.         {
  84.             width = 320,
  85.             height = 512,
  86.             scale = "letterBox",
  87.             xAlign = "center",
  88.             yAlign = "center",
  89.             imageSuffix =
  90.             {
  91.                 [""] = 1.5,
  92.                 ["-hd"] = 3.0,
  93.             },
  94.         },
  95.     }
  96. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement