LuaContainerProto
Last updated
Last updated
function proto:onControlAdded(control)
local element = control:Cast() -- Cast to underlying type (checkbox, slider ...)
if control.type == gui.ControlType.CHECKBOX then
element:GetValue():Set(true) -- Initialize all checkboxes inside this container with true.
self:Reset()
end
endfunction proto:onControlRemoved(control)
print('Removed:', control:GetLabel().text)
endfunction proto:onRenderPostChildren(contents, _, mins, maxs)
contents:AddRect(draw.Rect(mins, maxs), draw.color.Black():ModA(0.5))
end