Skip to content

Instantly share code, notes, and snippets.

@prophetgoddess
Created May 2, 2013 16:26
Show Gist options
  • Save prophetgoddess/5503398 to your computer and use it in GitHub Desktop.
Save prophetgoddess/5503398 to your computer and use it in GitHub Desktop.
require ("/lib/OOP/32log")
require ("/lib/tiledloader")
require ("/lib/lovelytiles/atlas")
require ("/lib/lovelytiles/drawstack")
require ("/lib/lovelytiles/grid")
require ("/lib/lovelytiles/isomap")
require ("/lib/lovelytiles/map")
require ("/lib/lovelytiles/mapdata")
require("/lib/jumper/Jumper")
require("/lib/easygui/main")
require("/lib/easygui/Class")
tilex = 0
tiley = 0
tilesize = 30
gridsizex = 100
gridsizey = 100
function love.load()
background = love.graphics.newImage("sprites/maintile.png")
starterBuilding = love.graphics.newImage("sprites/starterBuilding.png")
contentMenuImg = love.graphics.newImage("GUI/contentMenuImg.png")
menuBackground = love.graphics.newImage("GUI/buildMenu.png")
foodProductionIcon = love.graphics.newImage("GUI/foodProductionIcon.png")
resourceProcessingIcon = love.graphics.newImage("GUI/resourceProcessingIcon.png")
starportIcon = love.graphics.newImage("GUI/starportIcon.png")
manufactoryIcon = love.graphics.newImage("GUI/manufactoryIcon.png")
touristCenterIcon = love.graphics.newImage("GUI/touristCenterIcon.png")
mineIcon = love.graphics.newImage("GUI/mineIcon.png")
libraryIcon = love.graphics.newImage("GUI/libraryIcon.png")
hospitalIcon = love.graphics.newImage("GUI/hospitalIcon.png")
locked = love.graphics.newImage("GUI/locked.png")
TextButton:new("HoverButton")
TextLabel:new("Display")
HoverButton.text = "Hover me to see the TextLabel."
HoverButton.autoSize = false
HoverButton.size = {100,20}
HoverButton:centerText()--Aligns text to center on Y and X axis.
HoverButton.hasBorder = false
Display.text = ":o"
Display.visible = false
Display.size = {100,20}
Display:centerText()
Display.position = {0,20}
Display.hasBorder = false
HoverButton.mouseEntered:connect(function()
Display.visible = true
end)
HoverButton.mouseExited:connect(function()
Display.visible = false
end)
money = 10000
resources = 500
population = 20
size = 1
end
function love.update(dt)
if contentMenu == true then
contentMenu(contentMenuX, contentMenuY)
end
end
function love.mousepressed(x, y, button)
end
function love.draw()
love.graphics.draw(starterBuilding, 600, 300)
end
function love.mousereleased(x, y, button)
end
function love.keypressed(key, unicode)
end
function love.keyreleased(key)
end
function love.focus(f)
end
function love.quit()
end
function lockedDraw(x, y)
love.graphics.draw(locked, x, y)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment