forked from your-land-mirror/minetest-flow
21 lines
496 B
Markdown
21 lines
496 B
Markdown
# Hiding elements
|
|
|
|
Elements inside boxes can have `visible = false` set to hide them from the
|
|
player. Elements hidden this way will still take up space like with
|
|
`visibility: hidden;` in CSS.
|
|
|
|
## Example
|
|
|
|
```lua
|
|
gui.VBox{
|
|
gui.Button{label = "First button"},
|
|
gui.Button{label = "Hidden", visible = false},
|
|
gui.Button{label = "Last button"},
|
|
}
|
|
```
|
|
|
|
## Alternatives
|
|
|
|
If you don't want hidden elements to take up any space, see the documentation
|
|
for [gui.Nil](layout-elements.md#guinil).
|