long press the backspace key will clear input text

This commit is contained in:
chrox
2014-08-20 14:45:38 +08:00
parent 948d92a3b3
commit c83f35a0d0
2 changed files with 30 additions and 1 deletions

View File

@@ -151,6 +151,12 @@ function InputText:delChar()
UIManager:setDirty(self.parent, "partial")
end
function InputText:clear()
self.text = ""
self:initTextBox()
UIManager:setDirty(self.parent, "partial")
end
function InputText:getText()
return self.text
end