Version 0.9.2.2 - Alpha (see changelog.txt)

This commit is contained in:
Kenny Shields 2012-05-23 03:39:48 -04:00
parent e16001022c
commit 7ce4ccbaf6
5 changed files with 21 additions and 7 deletions

View File

@ -1,3 +1,10 @@
================================================
Version 0.9.2.2 - Alpha (May 23 - 2012)
================================================
[FIXED] vertical slider value direction (top is now max value and bottom is 0)
[FIXED] text flashing in the text input object when moving the text blinker to the right
[FIXED] text blinker in the text input object not appearing in certain situations
================================================
Version 0.9.2 - Alpha (May 22 - 2012)
================================================

View File

@ -9,7 +9,7 @@ loveframes = {}
-- library info
loveframes.info = {}
loveframes.info.author = "Nikolai Resokav"
loveframes.info.version = "0.9.2"
loveframes.info.version = "0.9.2.2"
loveframes.info.stage = "Alpha"
-- library configurations

View File

@ -109,8 +109,11 @@ function sliderbutton:update(dt)
self.staticy = 0
end
progress = loveframes.util.Round(self.staticy/(self.parent.height - self.height), 5)
nvalue = self.parent.min + (self.parent.max - self.parent.min) * progress
local space = self.parent.height - self.height
local remaining = (self.parent.height - self.height) - self.staticy
local percent = loveframes.util.Round(remaining/space, 5)
nvalue = self.parent.min + (self.parent.max - self.parent.min) * percent
pvalue = self.parent.value
end
@ -223,7 +226,7 @@ function sliderbutton:MoveToX(x)
end
--[[---------------------------------------------------------
- func: MoveToY(x)
- func: MoveToY(y)
- desc: moves the object to the specified y position
--]]---------------------------------------------------------
function sliderbutton:MoveToY(y)

View File

@ -201,7 +201,7 @@ function slider:SetValue(value)
local xpos = self.width * (( newval - self.min ) / (self.max - self.min))
sliderbutton:MoveToX(xpos)
elseif self.slidetype == "vertical" then
local ypos = self.height * (( newval - self.min ) / (self.max - self.min))
local ypos = self.height - self.height * (( newval - self.min ) / (self.max - self.min))
sliderbutton:MoveToY(ypos)
end
@ -354,4 +354,8 @@ function slider:SetSlideType(slidetype)
self.slidetype = slidetype
if slidetype == "vertical" then
self:SetValue(self.min)
end
end

View File

@ -264,8 +264,8 @@ function textinput:RunKey(key, unicode)
self:MoveBlinker(1)
if blinkx >= self.x + swidth and blinknum ~= #self.text then
local width = self.font:getWidth(self.text:sub(blinknum, blinknum))
self.xoffset = self.xoffset - width
elseif blinknum == #self.text and self.xoffset ~= ((0 - font:getWidth(self.text)) + swidth) then
self.xoffset = self.xoffset - width*2
elseif blinknum == #self.text and self.xoffset ~= ((0 - font:getWidth(self.text)) + swidth) and font:getWidth(self.text) + self.textxoffset > self.width then
self.xoffset = ((0 - font:getWidth(self.text)) + swidth)
end
end