mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-16 22:16:53 +07:00
basic layout system impl
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user