scenes/mainmenu: draw list menus inside a textbox

This commit is contained in:
Kazhnuz 2019-03-09 18:06:53 +01:00
parent 1ba8d6d251
commit 919c387345
2 changed files with 2 additions and 3 deletions

View File

@ -24,7 +24,6 @@ function MainMenu:new()
self.banner = game.gui.newBanner("banner.png", "IMPERIUM PORCORUM")
self.leftborder = game.gui.newBorder(0, 64+24, screenwidth)
self.rightborder = game.gui.newBorder(1, 64+24, screenwidth)
self.textbox = game.gui.newTextBox("assets/sprites/gui/textbox/bluetextbox.png", 240, 42+16)
self:register()
self.description = "nothing to see here"
end
@ -99,8 +98,6 @@ function MainMenu:draw()
self.assets.fonts["small"]:set()
self.assets.fonts["small"]:setLineHeight(1.2)
love.graphics.draw(self.textbox, middlex-120, middley+54)
love.graphics.printf(self.description, middlex-120+8, middley+62, 240-16, "left")
end
return MainMenu

View File

@ -15,9 +15,11 @@ function MenuObject:new(scene, name)
self.isActive = false
self.isVisible = false
self.textbox = game.gui.newTextBox("assets/sprites/gui/textbox/bluebox.png", width, height)
end
function MenuObject:draw()
love.graphics.draw(self.textbox, self.x, self.y)
MenuObject.super.draw(self)
end