From 2634383ffddac661e1308ce148d62e32824b7818 Mon Sep 17 00:00:00 2001 From: len0rd Date: Mon, 4 Aug 2025 21:34:36 -0400 Subject: [PATCH] layout: add newRow function, which increments the layout y position by the current cell height, while resetting the x position and internal width --- layout.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/layout.lua b/layout.lua index fd6b08c..5038beb 100644 --- a/layout.lua +++ b/layout.lua @@ -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()