form.addBitmapField¶
since 1.2.11
Add a bitmap field to the current form.
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
line |
FormLine | yes | the line where the field should be added |
rect |
Rect | yes | the coordinates |
path |
string | yes | the bitmaps directory |
getValue |
function | yes | the function which will return the current bitmap name |
setValue |
function | yes | the function which will be called on bitmap change |
Returns¶
The new field
Examples¶
From the official Ethos documentation
form.addBitmapField(line, nil, "/bitmaps/models", function() return bitmap end, function(newValue) bitmap = newValue end)