mirror of
https://codeberg.org/1414codeforge/yui.git
synced 2025-06-05 22:19:11 +02:00
[*] Initial commit.
This commit is contained in:
24
rows.lua
Normal file
24
rows.lua
Normal file
@ -0,0 +1,24 @@
|
||||
local BASE = (...):gsub('rows')
|
||||
|
||||
local Layout = require BASE..'layout'
|
||||
|
||||
local Rows = setmetatable({}, Layout)
|
||||
Rows.__index = Rows
|
||||
|
||||
|
||||
-- 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
|
||||
|
||||
function Rows.new(args)
|
||||
local self = setmetatable(Layout.new(args), Rows)
|
||||
|
||||
self.advance = rowadvance
|
||||
self.prev = 'up'
|
||||
self.next = 'down'
|
||||
return self
|
||||
end
|
||||
|
||||
return Rows
|
Reference in New Issue
Block a user