From 267359865eef1b35c070854dfefaa35492620fda Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 2 Aug 2020 13:47:27 +0200 Subject: [PATCH] improvement: better option menu --- sonic-radiance.love/scenes/options/menu.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sonic-radiance.love/scenes/options/menu.lua b/sonic-radiance.love/scenes/options/menu.lua index 98401bf..87a95d6 100644 --- a/sonic-radiance.love/scenes/options/menu.lua +++ b/sonic-radiance.love/scenes/options/menu.lua @@ -1,14 +1,22 @@ local ListBox = require "core.modules.menusystem.listbox" local OptionMenu = ListBox:extend() local WIDTH = 424/1.4 -local HEIGHT = 240/1.4 +local HEIGHT = 240/1.9 + +local gui = require "game.modules.gui" function OptionMenu:new(menusystem, name) local w, h = math.floor(WIDTH), math.floor(HEIGHT) local screenw, screenh = core.screen:getDimensions() local x = (screenw/2) - (w/2) local y = (screenh/2) - (h/2) - OptionMenu.super.new(self, menusystem, name, x, y, w, h, 8) + OptionMenu.super.new(self, menusystem, name, x, y, w, h, 6) + self.box = gui.newTextBox("assets/gui/dialogbox.png", w+16, h+16) +end + +function OptionMenu:draw() + love.graphics.draw(self.box, self.x-8, self.y-8) + OptionMenu.super.draw(self) end return OptionMenu