core/menusystem: fix a glitch in GridBox
This commit is contained in:
parent
db74b15d78
commit
caa0e86e12
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ local Menu = require(cwd .. "parent")
|
||||||
GridBox = Menu:extend()
|
GridBox = Menu:extend()
|
||||||
|
|
||||||
function GridBox:new(menusystem, name, x, y, w, h, slots_hor, slots_vert)
|
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 = slots_hor * slots_vert
|
||||||
self.slots_hor = slots_hor
|
self.slots_hor = slots_hor
|
||||||
self.slots_vert = slots_vert
|
self.slots_vert = slots_vert
|
||||||
|
@ -29,7 +29,7 @@ function GridBox:new(menusystem, name, x, y, w, h, slots_hor, slots_vert)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Menu:updateWidgetSize()
|
function GridBox:updateWidgetSize()
|
||||||
self.widget.h = math.floor( self.h / slots_vert )
|
self.widget.h = math.floor( self.h / slots_vert )
|
||||||
self.widget.w = math.floor( self.w / slots_hor )
|
self.widget.w = math.floor( self.w / slots_hor )
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue