mirror of https://gitea.it/1414codeforge/yui
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
530 B
Lua
25 lines
530 B
Lua
local BASE = (...):gsub('columns', '')
|
|
|
|
local Layout = require(BASE..'layout')
|
|
|
|
local Columns = setmetatable({}, Layout)
|
|
Columns.__index = Columns
|
|
|
|
|
|
-- Advance position to next column,
|
|
-- given current position, widget dimensions and padding.
|
|
local function columnadvance(x,y, ww,wh, padding)
|
|
return x + ww + padding, y
|
|
end
|
|
|
|
function Columns.new(args)
|
|
local self = setmetatable(Layout.new(args), Columns)
|
|
|
|
self.advance = columnadvance
|
|
self.prev = 'left'
|
|
self.next = 'right'
|
|
return self
|
|
end
|
|
|
|
return Columns
|