Version 0.9.5.7 - Alpha (see changelog.txt)

This commit is contained in:
Kenny Shields 2013-04-09 10:51:00 -04:00
parent 4614444ca4
commit ed8a78a10c
3 changed files with 18 additions and 11 deletions

View File

@ -1,3 +1,8 @@
================================================
Version 0.9.5.7 - Alpha (April 9 - 2013)
================================================
[FIXED] some issues with positioning the textinput object's text
================================================
Version 0.9.5.6 - Alpha (March 29 - 2013)
================================================

View File

@ -9,7 +9,7 @@ loveframes = {}
-- library info
loveframes.info = {}
loveframes.info.author = "Kenny Shields"
loveframes.info.version = "0.9.5.6"
loveframes.info.version = "0.9.5.7"
loveframes.info.stage = "Alpha"
-- library configurations

View File

@ -547,8 +547,9 @@ function newobject:RunKey(key, unicode)
if indicatorx >= (self.x + swidth) and indicatornum ~= #text then
local width = self.font:getWidth(text:sub(indicatornum, indicatornum))
self.offsetx = self.offsetx + width
elseif indicatornum == #text and self.offsetx ~= ((0 - font:getWidth(text)) + swidth) and font:getWidth(text) + self.textoffsetx > self.width then
self.offsetx = ((0 - font:getWidth(text)) + swidth)
elseif indicatornum == #text and self.offsetx ~= ((font:getWidth(text)) - swidth + 10) and font:getWidth(text) + self.textoffsetx > self.width then
self.offsetx = ((font:getWidth(text)) - swidth + 10)
--print(((0 - font:getWidth(text)) + swidth))
end
else
if indicatornum == #text then
@ -600,7 +601,7 @@ function newobject:RunKey(key, unicode)
if multiline then
if line > 1 and indicatornum == 0 then
local newindicatornum = 0
local oldtext = lines[line]
local oldtext = lines[line]
table.remove(lines, line)
self.line = line - 1
if #oldtext > 0 then
@ -613,8 +614,11 @@ function newobject:RunKey(key, unicode)
end
end
local cwidth = font:getWidth(text:sub(#text))
if self.offsetx ~= 0 then
if self.offsetx > 0 then
self.offsetx = self.offsetx - cwidth
print(self.offsetx, cwidth)
elseif self.offsetx < 0 then
self.offsetx = 0
end
end
elseif key == "delete" then
@ -860,12 +864,10 @@ function newobject:RemoveFromeText(p)
local line = self.line
local curline = lines[line]
local text = curline
local indicatornum = self.indicatornum
local part1 = text:sub(1, p - 1)
local part2 = text:sub(p + 1)
local new = part1 .. part2
return new
local part1 = text:sub(1, p - 1)
local part2 = text:sub(p + 1)
local new = part1 .. part2
return new
end