1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-17 16:57:39 +00:00

better text entry - bugfixes

This commit is contained in:
kepler155c@gmail.com
2019-03-29 15:47:01 -04:00
parent c1baf107c1
commit 19159730a4
4 changed files with 13 additions and 12 deletions

View File

@@ -35,13 +35,13 @@ end
function UI.TextEntry:setValue(value)
self.value = value
self.entry:unmark()
self.entry.value = value
self.entry.value = tostring(value)
self.entry:updateScroll()
end
function UI.TextEntry:setPosition(pos)
self.entry.pos = pos
self.entry.value = self.value
self.entry.value = tostring(self.value)
self.entry:updateScroll()
end
@@ -86,6 +86,7 @@ end
function UI.TextEntry:reset()
self.entry:reset()
self.value = ''
self:draw()
self:updateCursor()
end
@@ -105,7 +106,7 @@ end
function UI.TextEntry:eventHandler(event)
local text = self.value
self.entry.value = text
self.entry.value = tostring(text)
if event.ie and self.entry:process(event.ie) then
if self.entry.textChanged then
self.value = self.entry.value