코로나 SDK를 사용하는 데있어 새로운 기능이며 메인 메뉴 버튼에 약간의 문제가 있습니다. 단추를 누를 때마다보기가 이동하거나 변경되지 않습니다. 제목 화면에서 단추가 사라집니다.메인 메뉴 용 코로나 SDK Ui 버튼
module(..., package.seeall)
local ui = require ("ui")
local ui = require ("director")
local assetPath = "assets/"
local mainGroup = display.newGroup()
function new(params)
local titleScreen = display.newImageRect(assetPath .. "Law of Magic.jpg",
display.contentWidth, display.contentHeight)
titleScreen.x = display.contentWidth/2
titleScreen.y = 265
mainGroup:insert(titleScreen)
director:changeScene("titleScreen")
local newgame = ui.newButton{ default = assetPath .. "new game.png",
onRelease = function(event) director:changeScene("New game") end,}
newgame.x = display.contentWidth/2
newgame.y = 445
mainGroup:insert(newgame)
local continue = ui.newButton{ default = assetPath .. "continue.png",
onRelease = function(event) director:changeScene("Continue") end,}
continue.x = display.contentWidth/2
continue.y = 447
mainGroup:insert(continue)
local option = ui.newButton{ default = assetPath .. "option.png",
onRelease = function(event) director:changeScene("Option") end,}
option.x = display.contentWidth/2
option.y = 449
mainGroup:insert(option)
local help = ui.newButton{ default = assetPath .. "help.png",
onRelease = function(event) director:changeScene("Help") end,}
help.x = display.contentWidth/2
help.y = 451
mainGroup:insert(help)
local exitgame = ui.newButton{ default = assetPath .. "exit game.png",
onRelease = function(event) director:changeScene("Exit game") end,}
exitgame.x = display.contentWidth/2
exitgame.y = 453
mainGroup:insert(exitgame)
return mainGroup
end