wip pause screen
This commit is contained in:
parent
e764082a80
commit
057e9d3d41
3 changed files with 48 additions and 8 deletions
|
@ -14,7 +14,7 @@ return function(headerheight, fishsprite, headerbuttons, sheets, balance, moneyf
|
|||
local x = 19
|
||||
local y = 3
|
||||
for b = 1, 7 do
|
||||
local hovered = mouseOverBox(x * size, y * size, sprites['header/buttonbg']:getWidth() * size, sprites['header/buttonbg']:getHeight() * size)
|
||||
local hovered = mouseOverBox(x * size, y * size, sprites['header/buttonbg']:getWidth() * size, sprites['header/buttonbg']:getHeight() * size) and not paused
|
||||
local btn = headerbuttons[b]
|
||||
|
||||
if (btn and not btn.open) or not btn then
|
||||
|
@ -35,8 +35,8 @@ return function(headerheight, fishsprite, headerbuttons, sheets, balance, moneyf
|
|||
end
|
||||
|
||||
tooltipText = btn.tooltipText
|
||||
tooltipx = x + sprites['header/buttonbg']:getWidth() * size * 0.5 - tooltipText:getWidth()/2
|
||||
tooltipy = y + sprites['header/buttonbg']:getWidth() * size
|
||||
tooltipx = x * size + sprites['header/buttonbg']:getWidth() * size * 0.5 - tooltipText:getWidth()/2
|
||||
tooltipy = y * size + sprites['header/buttonbg']:getWidth() * size
|
||||
end
|
||||
|
||||
if btn then
|
||||
|
@ -106,6 +106,16 @@ return function(headerheight, fishsprite, headerbuttons, sheets, balance, moneyf
|
|||
x = x + incr
|
||||
end
|
||||
|
||||
-- options text
|
||||
local s = sprites['header/optionsbutton_hover']
|
||||
local hovered = mouseOverBox(sw - 115 * size, size * (HEADER_HEIGHT - 65), s:getWidth() * size, s:getHeight() * size) and not paused
|
||||
|
||||
if hovered and love.mouse.isDown(1) then
|
||||
love.graphics.draw(sprites['header/optionsbutton_down'], sw - 115 * size, size * (HEADER_HEIGHT - 65), 0, size, size)
|
||||
elseif hovered then
|
||||
love.graphics.draw(sprites['header/optionsbutton_hover'], sw - 115 * size, size * (HEADER_HEIGHT - 65), 0, size, size)
|
||||
end
|
||||
|
||||
-- money count
|
||||
if love.timer.getTime() % 0.25 < 0.125 and moneyflashtimer > 0 then love.graphics.draw(sprites['header/moneyflash'], sw * 0.851, (HEADER_HEIGHT - 29) * size, 0, size, size) end
|
||||
love.graphics.setFont(fonts.continuum)
|
||||
|
@ -114,7 +124,7 @@ return function(headerheight, fishsprite, headerbuttons, sheets, balance, moneyf
|
|||
love.graphics.printf(balance, round(sw * 0.965 - leftpad), round((HEADER_HEIGHT - 25) * size), leftpad, 'right')
|
||||
|
||||
-- tooltips
|
||||
if tooltipText then
|
||||
if tooltipText and not paused then
|
||||
love.graphics.setColor(254/255, 254/255, 199/255)
|
||||
love.graphics.rectangle('fill', round(tooltipx - 5), round(tooltipy - 5), round(tooltipText:getWidth() + 10), round(tooltipText:getHeight() + 10))
|
||||
love.graphics.setColor(2/255, 2/255, 2/255)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue