Merge pull request 'Deleted shit from pauseui' (#7) from bizcochito/Mothback:master into master
Reviewed-on: https://git.fai.su/lustlion/Mothback/pulls/7
This commit is contained in:
commit
151890b585
|
@ -5,56 +5,10 @@ function PauseUI()
|
||||||
local pauseX = (game.width/2)-(pauseWidth/2)
|
local pauseX = (game.width/2)-(pauseWidth/2)
|
||||||
local pauseY = (game.height/2)-(pauseHeight/2)
|
local pauseY = (game.height/2)-(pauseHeight/2)
|
||||||
local mouse_x, mouse_y = love.mouse.getPosition()
|
local mouse_x, mouse_y = love.mouse.getPosition()
|
||||||
|
--print(game.width .. " ".. game.height .. " ".. pauseWidth .. " ".. pauseHeight .. " " .. pauseX .. " " .. pauseY)
|
||||||
--Base items
|
-- Base items
|
||||||
love.graphics.setColor(0,0,0,0.3)
|
love.graphics.setColor(0,0,0,0.3)
|
||||||
love.graphics.rectangle("fill", 0, 0, game.width, game.height)
|
love.graphics.rectangle("fill", 0, 0, game.width, game.height)
|
||||||
love.graphics.setColor(1,1,1,1)
|
love.graphics.setColor(1,1,1,1)
|
||||||
love.graphics.rectangle("fill", pauseX, pauseY, pauseWidth, pauseHeight)
|
love.graphics.rectangle("fill", pauseX, pauseY, pauseWidth, pauseHeight)
|
||||||
--Close buttom
|
|
||||||
love.graphics.setColor(1,0,0,1)
|
|
||||||
love.graphics.rectangle("fill", pauseX+pauseWidth-40, pauseY+10, 30, 30)
|
|
||||||
if love.mouse.isDown(1) then
|
|
||||||
if mouse_x >= pauseX+pauseWidth-40
|
|
||||||
and mouse_y >= pauseY+10
|
|
||||||
and mouse_x <= pauseX+pauseWidth-10
|
|
||||||
and mouse_y <= pauseY+40 then
|
|
||||||
do_pause = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if pausepage == 1 then
|
|
||||||
--Game list button
|
|
||||||
love.graphics.setColor(0.5,0.5,0.5,1)
|
|
||||||
love.graphics.rectangle("fill", pauseX+(pauseWidth/2)-150, pauseY+100, 300, 40)
|
|
||||||
love.graphics.setColor(0,0.5,0.5,1)
|
|
||||||
love.graphics.printf("GAMES", pauseX+(pauseWidth/2), pauseY+100, 150, "left",0,3)
|
|
||||||
if love.mouse.isDown(1) then
|
|
||||||
if mouse_x >= pauseX+(pauseWidth/2)-150
|
|
||||||
and mouse_y >= pauseY+100
|
|
||||||
and mouse_x <= pauseX+(pauseWidth/2)+150
|
|
||||||
and mouse_y <= pauseY+140 then
|
|
||||||
pausepage = 2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
elseif pausepage == 2 then
|
|
||||||
--Back button
|
|
||||||
love.graphics.setColor(0.5,0.5,0.5,1)
|
|
||||||
love.graphics.rectangle("fill", pauseX+10, pauseY+10, 30, 30)
|
|
||||||
love.graphics.setColor(0,0,0,1)
|
|
||||||
love.graphics.printf("<", pauseX+10, pauseY+10, 30, "left", 0, 2)
|
|
||||||
if love.mouse.isDown(1) then
|
|
||||||
if mouse_x >= pauseX+10
|
|
||||||
and mouse_y >= pauseY+10
|
|
||||||
and mouse_x <= pauseX+40
|
|
||||||
and mouse_y <= pauseY+40 then
|
|
||||||
pausepage = 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
love.graphics.setColor(1,1,1,1)
|
|
||||||
for i=1,2 do
|
|
||||||
for j=1,3 do
|
|
||||||
love.graphics.draw(image.cartridge.nancy, j*110, i*85, 0, 100/image.cartridge.nancy:getPixelWidth(), 80/image.cartridge.nancy:getPixelHeight())
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue