Skip to content

form.addTimeField

since 26.1.0

Add a time field to the current form.

form.addTimeField(line, rect, getValue, setValue)

Parameters

Name Type Required Description
line FormLine yes the line where the field should be added
rect Rect yes the coordinates
getValue function yes the function which will return the current time
setValue function yes the function which will be called on time change

Returns

The new field

Examples

From the official Ethos documentation
form.addTimeField(line, nil, function() return time end, function(newValue) time = newValue end)