2022-08-16 09:49:14 +02:00
|
|
|
local BASE = (...):gsub('rows', '')
|
2022-08-15 23:41:17 +02:00
|
|
|
|
2022-08-16 00:23:52 +02:00
|
|
|
local Layout = require(BASE..'layout')
|
2022-08-15 23:41:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
-- Advance position to next row,
|
|
|
|
-- given current position, widget dimensions and padding.
|
|
|
|
local function rowadvance(x,y, ww,wh, padding)
|
|
|
|
return x, y + wh + padding
|
|
|
|
end
|
|
|
|
|
2022-08-16 09:49:14 +02:00
|
|
|
function Rows(args)
|
|
|
|
local self = Layout.new(args)
|
2022-08-15 23:41:17 +02:00
|
|
|
|
|
|
|
self.advance = rowadvance
|
|
|
|
self.prev = 'up'
|
|
|
|
self.next = 'down'
|
|
|
|
return self
|
|
|
|
end
|
|
|
|
|
|
|
|
return Rows
|