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)
================================================
[ADDED] a new base method: GetParents()
[ADDED] a new base method: IsTopInternal()
[ADDED] a new base method: IsInternal()

View File

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

View File

@ -1,6 +1,6 @@
--[[------------------------------------------------
-- LÖVE Frames --
-- By Kenny Shields --
-- Löve Frames --
-- Copyright 2012 Kenny Shields --
--]]------------------------------------------------
-- central library table
@ -9,7 +9,7 @@ loveframes = {}
-- library info
loveframes.info = {}
loveframes.info.author = "Nikolai Resokav"
loveframes.info.version = "0.9.3"
loveframes.info.version = "0.9.3.1"
loveframes.info.stage = "Alpha"
-- library configurations

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,9 @@
--[[------------------------------------------------
-- LÖVE Frames --
-- By Kenny Shields --
-- Löve Frames --
-- Copyright 2012 Kenny Shields --
--]]------------------------------------------------
-- progress bar class
-- progressbar class
progressbar = class("progressbar", base)
progressbar:include(loveframes.templates.default)
@ -287,9 +287,10 @@ end
--[[---------------------------------------------------------
- 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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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