core/menusystem: fix a glitch in GridBox

This commit is contained in:
Kazhnuz 2019-02-11 19:56:36 +01:00
parent db74b15d78
commit caa0e86e12

View file

@ -5,7 +5,7 @@ local Menu = require(cwd .. "parent")
GridBox = Menu:extend()
function GridBox:new(menusystem, name, x, y, w, h, slots_hor, slots_vert)
ListBox.super.new(self, menusystem, name, x, y, w, h)
GridBox.super.new(self, menusystem, name, x, y, w, h)
self.slots = slots_hor * slots_vert
self.slots_hor = slots_hor
self.slots_vert = slots_vert
@ -29,7 +29,7 @@ function GridBox:new(menusystem, name, x, y, w, h, slots_hor, slots_vert)
end
end
function Menu:updateWidgetSize()
function GridBox:updateWidgetSize()
self.widget.h = math.floor( self.h / slots_vert )
self.widget.w = math.floor( self.w / slots_hor )
end