more layout direction types

This commit is contained in:
BlackMATov
2020-02-13 14:53:50 +07:00
parent 6dbb4bbed0
commit 18894c9cfc
5 changed files with 103 additions and 79 deletions

View File

@@ -9,15 +9,15 @@ local layout = {
---@type boolean
dirty = false,
---@type layout_modes
mode = layout.modes.horizontal,
---@type layout_haligns
halign = layout.haligns.center,
---@type layout_valigns
valign = layout.valigns.center,
---@type layout_directions
direction = layout.directions.row,
---@type v2f
size = v2f.zero(),
@@ -28,12 +28,6 @@ local layout = {
padding = v2f.zero()
}
---@class layout_modes
layout.modes = {
horizontal = "horizontal",
vertical = "vertical"
}
---@class layout_haligns
layout.haligns = {
left = "left",
@@ -54,6 +48,14 @@ layout.valigns = {
space_between = "space_between"
}
---@class layout_directions
layout.directions = {
row = "row",
row_reversed = "row_reversed",
column = "column",
column_reversed = "column_reversed"
}
---@overload fun(self: layout)
---@param self layout
function layout.enable(self) end