gpt4 book ai didi

scripting - 电晕SDK : iPhone 5 adjustment

转载 作者:行者123 更新时间:2023-12-02 05:51:00 27 4
gpt4 key购买 nike

我在创建我的移动应用程序时使用了以下 config.lua 文件。

构 build 备时,屏幕不会适应 iPhone5。但是,它会在 corona 提供的模拟器上运行时进行调整。

你能告诉我问题是出在这个文件中,还是取决于其他一些实现问题。

谢谢!

/小号

local isTall = ( "iPhone" == system.getInfo( "model" ) ) and ( display.pixelHeight > 960 )

-- iPad Configuration
if ( string.sub( system.getInfo("model"), 1, 4 ) == "iPad" ) then
application =
{
content =
{
width = 360,
height = 480,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}

-- iPhone5 Configuration
elseif ( string.sub( system.getInfo("model"), 1, 2 ) == "iP" and display.pixelHeight > 960 ) then
application =
{
content =
{
width = 320,
height = 568,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}

-- iPhone 3,4 and Older iPod Touch
elseif ( string.sub( system.getInfo("model"), 1, 2 ) == "iP" ) then
application =
{
content =
{
width = 320,
height = 480,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}

-- Android, Kindle Fire, and Nook
elseif ( display.pixelHeight / display.pixelWidth > 1.72 ) then
application =
{
content =
{
width = 320,
height = 570,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}

else
application =
{
content =
{
width = 320,
height = 512,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}

end

最佳答案

解决了!

显然,我认为这一点一点都不清楚,需要添加(到应用程序的根目录)一个名为“Default-568h@2x.png”的文件,它告诉设备进入 iPhone5 模式!

此文件应为尺寸为 640x1136 的 png

可以在以下位置找到更多信息:

在“支持高大的应用程序”下

关于scripting - 电晕SDK : iPhone 5 adjustment,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16167846/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com