Skip to content

Instantly share code, notes, and snippets.

@mikelovesrobots
Created January 15, 2018 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikelovesrobots/96ad9b9488a9177978c24779b6265744 to your computer and use it in GitHub Desktop.
Save mikelovesrobots/96ad9b9488a9177978c24779b6265744 to your computer and use it in GitHub Desktop.
local LCS = require 'LCS'
local System = require 'knife.system'
local drawImage = require 'systems.drawImage'
local drawBackgroundColor = require 'systems.drawBackgroundColor'
local fadeIn = require 'systems.fadeIn'
local colors = {
white = {255, 255, 255, 255},
lightGreen = {208, 231, 153, 255},
lightPink = {251, 239, 244, 255},
}
local scene = {
backgroundColor = colors.white,
fadeOutColor = colors.white,
fadeInColor = colors.lightGreen,
}
local entities = {
{ image = love.graphics.newImage('images/pong_icon.png'), color = colors.lightPink, position = { x = -176, y = 0}},
{ image = love.graphics.newImage('images/controllers_test_icon.png'), color = colors.lightPink, position = { x = 176, y = 0}},
}
local ConsoleMenu = LCS.class({})
function ConsoleMenu:load()
fadeIn(scene)
end
function ConsoleMenu:update(dt)
end
function ConsoleMenu:draw()
drawBackgroundColor(scene)
for _, entity in ipairs(entities) do
drawImage(entity)
end
end
return ConsoleMenu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment