1
0
Fork 0
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:
v-rob 2025-05-27 13:06:59 -07:00
parent bb2f857b04
commit c7fca1b956
11 changed files with 323 additions and 3 deletions

View file

@ -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)