basic layout system impl

This commit is contained in:
BlackMATov
2020-02-07 11:13:20 +07:00
parent d584224223
commit 7075fb4fb4
5 changed files with 210 additions and 69 deletions

View File

@@ -13,29 +13,22 @@ local layout = {
disabled = false,
---@type layout_modes
mode = layout.modes.vertical,
---@type layout_valigns
valign = layout.valigns.center,
mode = layout.modes.horizontal,
---@type layout_haligns
halign = layout.haligns.center,
---@type layout_valigns
valign = layout.valigns.center,
---@type number
spacing = 0.0
}
---@class layout_modes
layout.modes = {
vertical = "vertical",
horizontal = "horizontal"
}
---@class layout_valigns
layout.valigns = {
top = "top",
center = "center",
bottom = "bottom"
horizontal = "horizontal",
vertical = "vertical"
}
---@class layout_haligns
@@ -45,6 +38,13 @@ layout.haligns = {
right = "right"
}
---@class layout_valigns
layout.valigns = {
top = "top",
center = "center",
bottom = "bottom"
}
---@overload fun(self: layout)
---@param self layout
function layout.enable(self) end