mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Version 0.9.2.2 - Alpha (see changelog.txt)
This commit is contained in:
parent
e16001022c
commit
7ce4ccbaf6
@ -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)
|
Version 0.9.2 - Alpha (May 22 - 2012)
|
||||||
================================================
|
================================================
|
||||||
|
2
init.lua
2
init.lua
@ -9,7 +9,7 @@ loveframes = {}
|
|||||||
-- library info
|
-- library info
|
||||||
loveframes.info = {}
|
loveframes.info = {}
|
||||||
loveframes.info.author = "Nikolai Resokav"
|
loveframes.info.author = "Nikolai Resokav"
|
||||||
loveframes.info.version = "0.9.2"
|
loveframes.info.version = "0.9.2.2"
|
||||||
loveframes.info.stage = "Alpha"
|
loveframes.info.stage = "Alpha"
|
||||||
|
|
||||||
-- library configurations
|
-- library configurations
|
||||||
|
@ -109,8 +109,11 @@ function sliderbutton:update(dt)
|
|||||||
self.staticy = 0
|
self.staticy = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
progress = loveframes.util.Round(self.staticy/(self.parent.height - self.height), 5)
|
local space = self.parent.height - self.height
|
||||||
nvalue = self.parent.min + (self.parent.max - self.parent.min) * progress
|
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
|
pvalue = self.parent.value
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -223,7 +226,7 @@ function sliderbutton:MoveToX(x)
|
|||||||
end
|
end
|
||||||
|
|
||||||
--[[---------------------------------------------------------
|
--[[---------------------------------------------------------
|
||||||
- func: MoveToY(x)
|
- func: MoveToY(y)
|
||||||
- desc: moves the object to the specified y position
|
- desc: moves the object to the specified y position
|
||||||
--]]---------------------------------------------------------
|
--]]---------------------------------------------------------
|
||||||
function sliderbutton:MoveToY(y)
|
function sliderbutton:MoveToY(y)
|
||||||
|
@ -201,7 +201,7 @@ function slider:SetValue(value)
|
|||||||
local xpos = self.width * (( newval - self.min ) / (self.max - self.min))
|
local xpos = self.width * (( newval - self.min ) / (self.max - self.min))
|
||||||
sliderbutton:MoveToX(xpos)
|
sliderbutton:MoveToX(xpos)
|
||||||
elseif self.slidetype == "vertical" then
|
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)
|
sliderbutton:MoveToY(ypos)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -354,4 +354,8 @@ function slider:SetSlideType(slidetype)
|
|||||||
|
|
||||||
self.slidetype = slidetype
|
self.slidetype = slidetype
|
||||||
|
|
||||||
|
if slidetype == "vertical" then
|
||||||
|
self:SetValue(self.min)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
@ -264,8 +264,8 @@ function textinput:RunKey(key, unicode)
|
|||||||
self:MoveBlinker(1)
|
self:MoveBlinker(1)
|
||||||
if blinkx >= self.x + swidth and blinknum ~= #self.text then
|
if blinkx >= self.x + swidth and blinknum ~= #self.text then
|
||||||
local width = self.font:getWidth(self.text:sub(blinknum, blinknum))
|
local width = self.font:getWidth(self.text:sub(blinknum, blinknum))
|
||||||
self.xoffset = self.xoffset - width
|
self.xoffset = self.xoffset - width*2
|
||||||
elseif blinknum == #self.text and self.xoffset ~= ((0 - font:getWidth(self.text)) + swidth) then
|
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)
|
self.xoffset = ((0 - font:getWidth(self.text)) + swidth)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user