Advertisement
Collzi

config.lua

Dec 22nd, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.69 KB | None | 0 0
  1. if string.sub(system.getInfo("model"),1,4) == "iPad" then
  2.     application =
  3.     {
  4.         content =
  5.         {
  6.             width = 360,
  7.             height = 480,
  8.             scale = "letterBox",
  9.             xAlign = "center",
  10.             yAlign = "center",
  11.             imageSuffix =
  12.             {
  13.                 ["@2x"] = 1.5,
  14.                 ["@4x"] = 3.0,
  15.             },
  16.         },
  17.         notification =
  18.         {
  19.             iphone = {
  20.                 types = {
  21.                     "badge", "sound", "alert"
  22.                 }
  23.             }
  24.         }
  25.     }
  26.  
  27. elseif string.sub(system.getInfo("model"),1,2) == "iP" and display.pixelHeight > 960 then
  28.     application =
  29.     {
  30.         content =
  31.         {
  32.             width = 320,
  33.             height = 568,
  34.             scale = "letterBox",
  35.             xAlign = "center",
  36.             yAlign = "center",
  37.             imageSuffix =
  38.             {
  39.                 ["@2x"] = 1.5,
  40.                 ["@4x"] = 3.0,
  41.             },
  42.         },
  43.         notification =
  44.         {
  45.             iphone = {
  46.                 types = {
  47.                     "badge", "sound", "alert"
  48.                 }
  49.             }
  50.         }
  51.     }
  52.  
  53. elseif string.sub(system.getInfo("model"),1,2) == "iP" then
  54.     application =
  55.     {
  56.         content =
  57.         {
  58.             width = 320,
  59.             height = 480,
  60.             scale = "letterBox",
  61.             xAlign = "center",
  62.             yAlign = "center",
  63.             imageSuffix =
  64.             {
  65.                 ["@2x"] = 1.5,
  66.                 ["@4x"] = 3.0,
  67.             },
  68.         },
  69.         notification =
  70.         {
  71.             iphone = {
  72.                 types = {
  73.                     "badge", "sound", "alert"
  74.                 }
  75.             }
  76.         }
  77.     }
  78. elseif display.pixelHeight / display.pixelWidth > 1.78 then
  79.     application =
  80.     {
  81.         content =
  82.         {
  83.             width = 380,
  84.             height = 570,
  85.             scale = "letterBox",
  86.             xAlign = "center",
  87.             yAlign = "center",
  88.             imageSuffix =
  89.             {
  90.                 ["@2x"] = 1.5,
  91.                 ["@4x"] = 3.0,
  92.             },
  93.         },
  94.     }
  95. else
  96.     application =
  97.     {
  98.         content =
  99.         {
  100.             width = 320,
  101.             height = 512,
  102.             scale = "letterBox",
  103.             xAlign = "center",
  104.             yAlign = "center",
  105.             imageSuffix =
  106.             {
  107.                 ["@2x"] = 1.5,
  108.                 ["@4x"] = 3.0,
  109.             },
  110.         },
  111.         notification =
  112.         {
  113.             iphone = {
  114.                 types = {
  115.                     "badge", "sound", "alert"
  116.                 }
  117.             }
  118.         }
  119.     }
  120. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement