GlyEngine 0.4
Create games and apps with lua
Loading...
Searching...
No Matches
Ui

Style

there is a css style componetization style, you define the name of a class and define fixed attributes or you can pass functions.

Attributes
  • pos_x
  • pos_y
  • width
  • height
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')
:style('center home')
:add(item1)
:add({})
:add(item2)