garden/main.lua
2024-12-30 19:46:44 +09:00

58 lines
1,023 B
Lua

-- Imports
local window = require("window")
local button = require("button")
local inventory = {
x = 0, y = 0,
width = WIDTH*0.7,
height = HEIGHT*0.2,
}
inventory.draw = window.draw(function(self)
window.draw_border(self.width, self.height)
end)
local screen = {
x = 0, y = inventory.height,
width = inventory.width,
height = HEIGHT - inventory.height,
}
screen.draw = window.draw(function(self)
window.draw_border(self.width, self.height)
end)
local log = {
x = inventory.width , y = 0,
width = WIDTH*0.3,
height = HEIGHT,
}
log.draw = window.draw(function(self)
window.draw_border(self.width, self.height)
end)
function love.load()
timer = 0
end
function love.mousepressed(x, y, button)
local x, y = x / MULTIPLIER, y / MULTIPLIER
end
function love.update(dt)
timer = timer + dt
end
function love.draw()
love.graphics.push()
love.graphics.scale(MULTIPLIER)
screen:draw()
inventory:draw()
log:draw()
love.graphics.pop()
end