The grid system is very versatile, and adjusts itself with the resolution and can be used by nesting one grid inside another, the best of all is that in frameworks that limit you to thinking in 12 or 24 columns like
bootstrap you must define how many columns yourself.
- Example
local function init(std, data)
std.ui.grid('4x8 full6x8 ultra8x8')
end
local function add_items(applications)
- Breakpoints
- Todo
- comming soon
| 1seg | SD 480 | HD 720 | FULL HD 1080 | QUAD HD 1440 | ULTRA HD 4K |
prefix | | sd | hd | full | quad | ultra |
width | >0px | >679px | >1279px | >1919px | >2569px | >3839px |
- Offset
- To create blank columns, simply add an empty table
{}
to represent an empty node. You can also specify the size of these whitespace columns as needed.
std.ui.grid('3x2')
:apply()
local function add(application, size)
- Columns
You can add several different items to your grid: classes, nodes, offsets, entire applications and even another grid.
- class
local btn = {
draw=function(std, data)end
}
std.ui.grid(
'1x1'):
add(btn)
- node
local btn_node = std.node.load(btn)
std.ui.grid(
'1x1'):
add(node_btn)
- offset
std.ui.grid(
'1x1'):
add({})
- application
local game = {
meta={
},
callbacks={
init=function() end,
loop=function() end,
draw=function() end,
}
}
std.ui.grid(
'1x1'):
add(game)
local function title(window_name)
- grid
std.ui.grid('1x1')
)
:apply()
also known as carousel, it has similar behavior to grid but with visual selection of items. but it only accepts one-dimensional grids such as
1x1
2x1
or
1x2
.
- Example
std.ui.slide('6x1')
:apply()
there is a css style componetization style, you define the name of a class and define fixed attributes or you can pass functions.
- Attributes
- Example
std.ui.style('home')
:height(300)
:pos_y(function(std, node, parent)
return parent.data.height - 300
end)
std.ui.style('center')
:pos_x(function(std, node, parent)
return parent.data.width/2 - node.data.width/2
end)
std.ui.grid('3x1')
local function style(classlist)