From 3eddd8bb21e7836c731ff4e0a7d2f2f5a637029e Mon Sep 17 00:00:00 2001 From: bizcochito Date: Thu, 20 Jan 2022 13:34:30 +0100 Subject: [PATCH] Deleted shit from pauseui --- data/scripts/pause.lua | 50 ++---------------------------------------- 1 file changed, 2 insertions(+), 48 deletions(-) diff --git a/data/scripts/pause.lua b/data/scripts/pause.lua index 9d34cd6..aa78322 100644 --- a/data/scripts/pause.lua +++ b/data/scripts/pause.lua @@ -5,56 +5,10 @@ function PauseUI() local pauseX = (game.width/2)-(pauseWidth/2) local pauseY = (game.height/2)-(pauseHeight/2) local mouse_x, mouse_y = love.mouse.getPosition() - - --Base items + --print(game.width .. " ".. game.height .. " ".. pauseWidth .. " ".. pauseHeight .. " " .. pauseX .. " " .. pauseY) + -- Base items love.graphics.setColor(0,0,0,0.3) love.graphics.rectangle("fill", 0, 0, game.width, game.height) love.graphics.setColor(1,1,1,1) 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