Class Stack
Used to place one block over another.
Places child blocks one "over" another. You already know how to place one
block over another
using the on property. This block just puts every child element inside
its enclosing cell
one by one, one over another. For example, provided you have this image:
Fig. 1
┌────────┐
│ ▞▚▞▚ │
│ ▚ ▞ │
│ ▚▞ │
└────────┘
doing this
local stack = ui.Stack { ui.Image { path = 'foo.png', }, ui.Label { text = 'This is a stack' }, } stack:place(0, 0, 100, 100) stack:draw()
will result in
Fig. 2
┌────────┐
│ ▞▚▞▚ │
This is a stack
│ ▚▞ │
└────────┘
Class Stack
| stack:new () | Constructor. |
Class Stack
Represents a stack of elements.