Version 0.9.3.1 - Alpha (see changelog.txt)

This commit is contained in:
Kenny Shields 2012-09-02 17:13:13 -04:00
parent 138e335f82
commit d6190b4757
38 changed files with 108 additions and 105 deletions

View File

@ -1,7 +1,16 @@
================================================
Version 0.9.3.1 - Alpha (Spetember 2 - 2012)
================================================
[ADDED] numpad enter key support for textinput.OnEnter
[FIXED] duplicate progressbar:GetCompleted() in progressbar.lua
[CHANGED] textinput.OnTextEnterd to textinput.OnTextChanged
[CHANGED] textinput.OnTextChanged is now also called when the backspace key is pressed
================================================ ================================================
Version 0.9.3 - Alpha (Spetember 1 - 2012) Version 0.9.3 - Alpha (Spetember 1 - 2012)
================================================ ================================================
[ADDED] a new base method: GetParents() [ADDED] a new base method: GetParents()
[ADDED] a new base method: IsTopInternal() [ADDED] a new base method: IsTopInternal()
[ADDED] a new base method: IsInternal() [ADDED] a new base method: IsInternal()

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- debug library -- debug library

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- central library table -- central library table
@ -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.3" loveframes.info.version = "0.9.3.1"
loveframes.info.stage = "Alpha" loveframes.info.stage = "Alpha"
-- library configurations -- library configurations

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- base object -- base object

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- button clas -- button clas

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- checkbox class -- checkbox class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- button clas -- button clas

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- columnlist object -- columnlist object

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- frame class -- frame class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- progress bar class -- progress bar class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- imagebutton clas -- imagebutton clas

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- closebutton clas -- closebutton clas

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- columnlistarea object -- columnlistarea object

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- columnlistrow object -- columnlistrow object

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- columnlistheader object -- columnlistheader object

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- modalbackground class -- modalbackground class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- multichoicelist class -- multichoicelist class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- multichoicerow class -- multichoicerow class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- scrollbar class -- scrollbar class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- scrollbar class -- scrollbar class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- scrollbar class -- scrollbar class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- scrollbutton clas -- scrollbutton clas

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- closebutton clas -- closebutton clas

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- tabbutton clas -- tabbutton clas

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- tooltip clas -- tooltip clas

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- list class -- list class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- progress bar class -- progress bar class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- panel class -- panel class

View File

@ -1,9 +1,9 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- progress bar class -- progressbar class
progressbar = class("progressbar", base) progressbar = class("progressbar", base)
progressbar:include(loveframes.templates.default) progressbar:include(loveframes.templates.default)
@ -287,9 +287,10 @@ end
--[[--------------------------------------------------------- --[[---------------------------------------------------------
- func: GetCompleted() - func: GetCompleted()
- desc: gets the value of object.completed - desc: gets whether or not the object has reached it's
maximum value
--]]--------------------------------------------------------- --]]---------------------------------------------------------
function progressbar:GetLerpRate() function progressbar:GetCompleted()
return self.completed return self.completed

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- text clas -- text clas

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- tabs class -- tabs class

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
--[[------------------------------------------------ --[[------------------------------------------------

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- textinput clas -- textinput clas
@ -39,7 +39,7 @@ function textinput:initialize()
self.focus = false self.focus = false
self.internal = false self.internal = false
self.OnEnter = nil self.OnEnter = nil
self.OnTextEntered = nil self.OnTextChanged = nil
end end
@ -259,30 +259,20 @@ function textinput:RunKey(key, unicode)
self.unicode = unicode self.unicode = unicode
if key == "left" then if key == "left" then
if self.alltextselected == true then self:MoveBlinker(-1)
self.alltextselected = false if blinkx <= self.x and blinknum ~= 0 then
self.blinknum = 0 local width = self.font:getWidth(self.text:sub(blinknum, blinknum + 1))
else self.xoffset = self.xoffset + width
self:MoveBlinker(-1) elseif blinknum == 0 and self.xoffset ~= 0 then
if blinkx <= self.x and blinknum ~= 0 then self.xoffset = 0
local width = self.font:getWidth(self.text:sub(blinknum, blinknum + 1))
self.xoffset = self.xoffset + width
elseif blinknum == 0 and self.xoffset ~= 0 then
self.xoffset = 0
end
end end
elseif key == "right" then elseif key == "right" then
if self.alltextselected == true then self:MoveBlinker(1)
self.alltextselected = false if blinkx >= self.x + swidth and blinknum ~= #self.text then
self.blinknum = #self.text local width = self.font:getWidth(self.text:sub(blinknum, blinknum))
else self.xoffset = self.xoffset - width*2
self:MoveBlinker(1) elseif blinknum == #self.text and self.xoffset ~= ((0 - font:getWidth(self.text)) + swidth) and font:getWidth(self.text) + self.textxoffset > self.width then
if blinkx >= self.x + swidth and blinknum ~= #self.text then self.xoffset = ((0 - font:getWidth(self.text)) + swidth)
local width = self.font:getWidth(self.text:sub(blinknum, blinknum))
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 end
end end
@ -291,12 +281,15 @@ function textinput:RunKey(key, unicode)
if text ~= "" then if text ~= "" then
self.text = self:RemoveFromeText(blinknum) self.text = self:RemoveFromeText(blinknum)
self:MoveBlinker(-1) self:MoveBlinker(-1)
if self.OnTextChanged then
self.OnTextChanged(self, "")
end
end end
local cwidth = font:getWidth(self.text:sub(#self.text)) local cwidth = font:getWidth(self.text:sub(#self.text))
if self.xoffset ~= 0 then if self.xoffset ~= 0 then
self.xoffset = self.xoffset + cwidth self.xoffset = self.xoffset + cwidth
end end
elseif key == "return" then elseif key == "return" or key == "kpenter" then
if self.OnEnter ~= nil then if self.OnEnter ~= nil then
self.OnEnter(self, self.text) self.OnEnter(self, self.text)
end end
@ -349,8 +342,8 @@ function textinput:RunKey(key, unicode)
self:MoveBlinker(1) self:MoveBlinker(1)
end end
if self.OnTextEntered then if self.OnTextChanged then
self.OnTextEntered(self, ckey) self.OnTextChanged(self, ckey)
end end
local cwidth = font:getWidth(ckey) local cwidth = font:getWidth(ckey)

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
loveframes.skins = {} loveframes.skins = {}

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- skin table -- skin table

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- skin table -- skin table

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- templates -- templates

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------ --[[------------------------------------------------
-- LÖVE Frames -- -- Löve Frames --
-- By Kenny Shields -- -- Copyright 2012 Kenny Shields --
--]]------------------------------------------------ --]]------------------------------------------------
-- util library -- util library