如何在 Corona sdk 中为 Android 添加黑色边框

如何制作横向屏幕的游戏而不是全屏幕?我需要左右两侧的黑色边框,就像图片中一样。

我的 config.lua

application =

{ content = { width = 320, height = 480, scale = "letterbox", fps = 60,

    --[[
    imageSuffix =
    {
            ["@2x"] = 2,
            ["@4x"] = 4,
    },
    --]]
},

}

build.settings

orientation =
{
    -- 支持的方向:
    -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight
    default = "landscapeRight",
    supported = { "landscapeLeft", "landscapeRight", },
}

enter image description here

enter image description here

原文链接 https://stackoverflow.com/questions/70913034

点赞