mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add preliminary text support
This commit is contained in:
parent
bb2f857b04
commit
c7fca1b956
11 changed files with 323 additions and 3 deletions
|
@ -45,6 +45,8 @@ function ui.Elem:new(param)
|
|||
end
|
||||
|
||||
function ui.Elem:_init(props)
|
||||
self._label = ui._opt(props.label, "string")
|
||||
|
||||
self._groups = {}
|
||||
self._children = {}
|
||||
|
||||
|
@ -114,6 +116,10 @@ function ui.Elem:_encode_fields()
|
|||
ui._encode_flag(fl, "Z", ui._encode_array("z", child_ids))
|
||||
end
|
||||
|
||||
if ui._shift_flag(fl, self._label) then
|
||||
ui._encode_flag(fl, "s", self._label)
|
||||
end
|
||||
|
||||
self:_encode_box(fl, self._boxes.main)
|
||||
|
||||
return ui._encode_flags(fl)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue