alpha 0.1
This commit is contained in:
@@ -2,10 +2,8 @@ Menu = {}
|
||||
class("Menu").extends(BaseScene)
|
||||
local scene = Menu
|
||||
|
||||
|
||||
|
||||
function scene:setValues()
|
||||
self.background = Graphics.image.new("assets/images/background2")
|
||||
self.background = Graphics.image.new("assets/images/menuBg")
|
||||
|
||||
self.color1 = Graphics.kColorBlack
|
||||
self.color2 = Graphics.kColorWhite
|
||||
@@ -26,9 +24,12 @@ function scene:init()
|
||||
local menuSelSound = playdate.sound.fileplayer.new("assets/audio/menu_select")
|
||||
menuSelSound:setVolume(0.5)
|
||||
|
||||
local menuConfirmSound = playdate.sound.fileplayer.new("assets/audio/confirm")
|
||||
-- menuConfirmSound:setVolume(0.5)
|
||||
|
||||
self:setValues()
|
||||
|
||||
self.menu = Noble.Menu.new(false, Noble.Text.ALIGN_CENTER, false, self.color2, 4,6,0, Noble.Text.FONT_SMALL)
|
||||
self.menu = Noble.Menu.new(false, Noble.Text.ALIGN_CENTER, false, self.color2, 4, 6, 0, Noble.Text.FONT_SMALL)
|
||||
|
||||
self:setupMenu(self.menu)
|
||||
|
||||
@@ -56,10 +57,10 @@ function scene:init()
|
||||
end
|
||||
end,
|
||||
AButtonDown = function()
|
||||
menuConfirmSound:play(1)
|
||||
self.menu:click()
|
||||
end
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
function scene:enter()
|
||||
@@ -86,13 +87,12 @@ function scene:update()
|
||||
|
||||
Graphics.setColor(self.color1)
|
||||
Graphics.setDitherPattern(0.2, Graphics.image.kDitherTypeScreen)
|
||||
Graphics.fillRoundRect(200-38, 160-8, 75, 60, 15)
|
||||
Graphics.fillRoundRect(200 - 38, 160 - 8, 75, 60, 15)
|
||||
self.menu:draw(200, 160)
|
||||
|
||||
logo_image:draw(120, 55)
|
||||
-- logo_image:draw(120, 55)
|
||||
|
||||
Graphics.setColor(Graphics.kColorBlack)
|
||||
|
||||
end
|
||||
|
||||
function scene:exit()
|
||||
@@ -102,8 +102,8 @@ function scene:exit()
|
||||
end
|
||||
|
||||
function scene:setupMenu(__menu)
|
||||
__menu:addItem("Start", function() Noble.transition(Game, nil, Noble.Transition.DipToWhite) end)
|
||||
__menu:addItem("Tutorial", function() return end)
|
||||
__menu:addItem("Credits", function() return end)
|
||||
__menu:addItem("Start", function() Noble.transition(DroneSelection, nil, Noble.Transition.DipToWhite) end)
|
||||
__menu:addItem("Tutorial", function() return end)
|
||||
__menu:addItem("Credits", function() return end)
|
||||
__menu:select("Start")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user