layout: add newRow function, which increments the layout y position by the current cell height, while resetting the x position and internal width
This commit is contained in:
parent
28abbc8bd1
commit
2634383ffd
1 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,7 @@ function Layout:reset(x,y, padx,pady)
|
|||
self._widths = {}
|
||||
self._heights = {}
|
||||
self._isFirstCell = true
|
||||
self._start_x = self._x
|
||||
|
||||
return self
|
||||
end
|
||||
|
@ -35,6 +36,12 @@ function Layout:nextRow()
|
|||
return self._x, self._y + self._h + self._pady
|
||||
end
|
||||
|
||||
function Layout:newRow()
|
||||
self._x = self._start_x
|
||||
self._y = self._y + self._h + self._pady
|
||||
self._w = nil
|
||||
end
|
||||
|
||||
Layout.nextDown = Layout.nextRow
|
||||
|
||||
function Layout:nextCol()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue