support EditField:setText() so scripts can use it

and be compatible with both the develop and docs branch
develop
myk002 2022-07-20 15:40:49 -07:00
parent c9f69081a6
commit 64b793b409
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 4 additions and 0 deletions

@ -207,6 +207,10 @@ function EditField:getPreferredFocusState()
return not self.key
end
function EditField:setText(text, cursor)
self.text = text
end
function EditField:postUpdateLayout()
self.text_offset = self.subviews[1]:getTextWidth()
end