upscaled sprites, some readjustments
Before Width: | Height: | Size: 500 KiB After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 161 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 168 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 180 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 190 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 176 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 191 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 185 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 196 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 187 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 204 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 194 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 220 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 8 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 81 KiB |
11
main.lua
|
@ -72,6 +72,7 @@ function love.load()
|
|||
end
|
||||
|
||||
local cursor
|
||||
local lastcursor = nil
|
||||
function setCursor(mouse)
|
||||
cursor = mouse
|
||||
end
|
||||
|
@ -88,13 +89,11 @@ function love.update(dt)
|
|||
if scene.update then scene.update(dt) end
|
||||
bench.stopBenchmark('update')
|
||||
|
||||
if not is_mobile then
|
||||
if cursor then
|
||||
love.mouse.setCursor(cursor)
|
||||
else
|
||||
love.mouse.setCursor(cursors.default)
|
||||
end
|
||||
if not cursor then cursor = 'default' end
|
||||
if (not is_mobile) and (cursor ~= lastcursor) then
|
||||
love.mouse.setCursor(cursors[cursor])
|
||||
end
|
||||
lastcursor = cursor
|
||||
end
|
||||
|
||||
function love.draw()
|
||||
|
|
|
@ -139,7 +139,7 @@ function self.update(dt)
|
|||
local hovered = mouseOverBox(x * size, y * size, sprites['header/buttonbg']:getWidth() * size, sprites['header/buttonbg']:getHeight() * size)
|
||||
|
||||
if btn.open and hovered and not paused then
|
||||
setCursor(cursors.hover)
|
||||
setCursor('hover')
|
||||
end
|
||||
|
||||
local incr = 69 -- its like button positions but forcefully shoved into a recursive function :D
|
||||
|
@ -152,7 +152,7 @@ function self.update(dt)
|
|||
local size = love.graphics.getWidth() / 640
|
||||
local hovered = mouseOverBox(love.graphics.getWidth() - 115 * size, size * (HEADER_HEIGHT - 65), s:getWidth() * size, s:getHeight() * size)
|
||||
if hovered and not paused then
|
||||
setCursor(cursors.hover)
|
||||
setCursor('hover')
|
||||
end
|
||||
|
||||
bench.stopBenchmark('update_buttons')
|
||||
|
|
|
@ -19,7 +19,7 @@ return function(money, dt, sheets)
|
|||
|
||||
local dist = math.abs(love.mouse.getX() - f.x * love.graphics.getWidth()) + math.abs(love.mouse.getY() - f.y * love.graphics.getHeight())
|
||||
if dist < sheets.coin1.width/2 and not f.collected then
|
||||
setCursor(cursors.hover)
|
||||
setCursor('hover')
|
||||
end
|
||||
end
|
||||
end
|