improvement: add a border to pause menu

This commit is contained in:
Kazhnuz 2019-12-28 22:20:51 +01:00
parent 67a6e557e5
commit 0625c8d82c
2 changed files with 4 additions and 1 deletions

View file

@ -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)

View file

@ -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