From 0625c8d82c33095ed1f403e2ea0a8ee9c4001a08 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 28 Dec 2019 22:20:51 +0100 Subject: [PATCH] improvement: add a border to pause menu --- sonic-bluestreak.love/game/modules/gui/init.lua | 2 +- sonic-bluestreak.love/game/modules/playstyle/pause.lua | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sonic-bluestreak.love/game/modules/gui/init.lua b/sonic-bluestreak.love/game/modules/gui/init.lua index 164069a..d38f796 100644 --- a/sonic-bluestreak.love/game/modules/gui/init.lua +++ b/sonic-bluestreak.love/game/modules/gui/init.lua @@ -53,7 +53,7 @@ function gui.drawBar(x, y, width, height) end function gui.newTextBox(type, width, height) - local filepath = "assets/gui/dialogs/" + type + ".png" + local filepath = "assets/gui/dialogs/" .. type .. ".png" local baseimage = love.graphics.newImage(filepath) local quad = {} quad[1] = love.graphics.newQuad(00, 00, 8, 8, 24, 24) diff --git a/sonic-bluestreak.love/game/modules/playstyle/pause.lua b/sonic-bluestreak.love/game/modules/playstyle/pause.lua index 8237414..833eab2 100644 --- a/sonic-bluestreak.love/game/modules/playstyle/pause.lua +++ b/sonic-bluestreak.love/game/modules/playstyle/pause.lua @@ -23,12 +23,15 @@ function PauseMenu:new(playstyle) local font = self.playstyle.assets.fonts["menu"] + self.textbox = game.gui.newTextBox("basic", width+16, height+16) + ResumeWidget(self, font) RestartWidget(self, font) ExitWidget(self, font) end function PauseMenu:draw() + love.graphics.draw(self.textbox, self.x-8, self.y-8) PauseMenu.super.draw(self) end