From 923f3d36966f0b84d983405167544ae2fb0825a6 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Thu, 19 Aug 2021 14:16:34 -0400 Subject: [PATCH] Added drawIfPaused to gamemode.lua --- tetris/modes/gamemode.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 187315d..5d1d287 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -900,6 +900,11 @@ end function GameMode:drawCustom() end +function GameMode:drawIfPaused() + love.graphics.setFont(font_3x5_3) + love.graphics.printf("GAME PAUSED!", 64, 160, 160, "center") +end + -- transforms specified in here will transform the whole screen -- if you want a transform for a particular component, push the -- default transform by using love.graphics.push(), do your @@ -930,9 +935,8 @@ function GameMode:draw(paused) ) end - love.graphics.setFont(font_3x5_3) if paused then - love.graphics.printf("GAME PAUSED!", 64, 160, 160, "center") + self:drawIfPaused() end if self.completed then