This commit is contained in:
Stepets 2014-11-20 18:44:33 +03:00
commit ff861631c4
43 changed files with 75 additions and 48 deletions

View File

@ -31,6 +31,8 @@ Version 0.10 - Alpha (Release Date TBD)
[ADDED] a new frame method: SetMinSize(width, height)
[ADDED] a new frame method: GetMinSize()
[ADDED] a new textinput method: ClearLine(line)
[ADDED] a new textinput method: SetTrackingEnabled(bool)
[ADDED] a new textinput method: GetTrackingEnabled()
[ADDED] a new list method: GetAutoScroll()
[FIXED] bug that would cause tabbuttons to be positioned incorrectly when scrolling with the mouse wheel
@ -56,6 +58,7 @@ Version 0.10 - Alpha (Release Date TBD)
[CHANGED] template files are now expected to return a template table instead of calling loveframes.templates.Register
[CHANGED] textinput tries to scroll horizontally only if alt is pressed
[CHANGED] project-wide utf8 support
[CHANGED] the textinput's indicator is now always visible when being moved
================================================
Version 0.9.8.1 - Alpha (May 17 - 2014)

View File

@ -47,13 +47,8 @@ loveframes.collisions = {}
-- install directory of the library
local dir = loveframes.config["DIRECTORY"] or path
-- require the internal base libraries
-- require middleclass
loveframes.class = require(dir .. ".third-party.middleclass")
require(dir .. ".libraries.util")
require(dir .. ".libraries.skins")
require(dir .. ".libraries.templates")
require(dir .. ".libraries.debug")
require(dir .. ".libraries.utf8")
-- replace all "." with "/" in the directory setting
dir = dir:gsub("\\", "/"):gsub("(%a)%.(%a)", "%1/%2")

View File

@ -1 +1 @@
return {}
return {}

View File

@ -176,4 +176,4 @@ function loveframes.templates.ApplyToObject(object)
end
end
end
end

View File

@ -369,4 +369,4 @@ function loveframes.util.IsCtrlDown()
love.keyboard.isDown("lgui") or love.keyboard.isDown("rgui")
end
return love.keyboard.isDown("lctrl") or love.keyboard.isDown("rctrl")
end
end

View File

@ -1272,4 +1272,4 @@ function newobject:GetState()
return self.state
end
end

View File

@ -292,4 +292,4 @@ function newobject:GetToggleable()
return self.toggleable
end
end

View File

@ -454,4 +454,4 @@ function newobject:GetEnabled()
return self.enabled
end
end

View File

@ -368,4 +368,4 @@ function newobject:GetOpen()
return self.open
end
end

View File

@ -984,4 +984,3 @@ function newobject:SetColumnOrder(curid, newid)
return self
end

View File

@ -342,4 +342,4 @@ function newobject:GetName()
return self.name
end
end

View File

@ -397,4 +397,4 @@ function newobject:GetCellPadding()
return self.cellpadding
end
end

View File

@ -417,4 +417,4 @@ function newobject:GetImageHeight()
return image:getHeight()
end
end
end

View File

@ -337,4 +337,4 @@ function newobject:GetImageHeight()
return image:getHeight()
end
end
end

View File

@ -184,4 +184,4 @@ function newobject:GetAutoPosition()
return self.autoposition
end
end

View File

@ -454,4 +454,4 @@ function newobject:GetHorizontalScrollBody()
return false
end
end

View File

@ -243,4 +243,4 @@ function newobject:GetSelected()
return self.selected
end
end

View File

@ -165,4 +165,4 @@ function newobject:GetOffsetY()
return self.offsety
end
end

View File

@ -252,4 +252,4 @@ function newobject:SetFunction(func)
self.func = func
end
end

View File

@ -104,4 +104,4 @@ function newobject:draw()
drawfunc(self)
end
end
end

View File

@ -429,4 +429,4 @@ function newobject:Close()
self:Remove()
self.list.haslist = false
end
end

View File

@ -183,4 +183,4 @@ function newobject:GetText()
return self.text
end
end

View File

@ -236,4 +236,4 @@ function newobject:GetBarType()
return self.bartype
end
end

View File

@ -387,4 +387,4 @@ function newobject:GetBarType()
return self.bartype
end
end

View File

@ -224,4 +224,4 @@ function newobject:GetScrollBar()
return self.internals[1].internals[1]
end
end

View File

@ -166,4 +166,4 @@ function newobject:GetScrollType()
return self.scrolltype
end
end

View File

@ -255,4 +255,4 @@ function newobject:MoveToY(y)
self.staticy = y
end
end

View File

@ -231,4 +231,4 @@ function newobject:GetTabNumber()
return self.tabnumber
end
end

View File

@ -394,4 +394,4 @@ function newobject:GetFollowObject()
return self.followobject
end
end

View File

@ -303,4 +303,4 @@ function newobject:GetOpen()
return self.open
end
end

View File

@ -141,4 +141,4 @@ function newobject:mousepressed(x, y, button)
print(self.parent.level)
end
end
end

View File

@ -812,4 +812,4 @@ function newobject:GetDTScrolling()
return self.dtscrolling
end
end

View File

@ -329,4 +329,4 @@ function newobject:SetVisible(bool)
return self
end
end

View File

@ -451,4 +451,4 @@ function newobject:GetEnabled()
return self.enabled
end
end

View File

@ -524,4 +524,4 @@ function newobject:GetDecimals()
return self.decimals
end
end

View File

@ -173,4 +173,4 @@ function newobject:mousereleased(x, y, button)
v:mousereleased(x, y, button)
end
end
end

View File

@ -351,4 +351,4 @@ function newobject:GetText()
return self.text
end
end

View File

@ -553,4 +553,4 @@ function newobject:GetEnabled()
return self.enabled
end
end

View File

@ -763,4 +763,4 @@ function newobject:GetAutoButtonAreaWidth()
return self.autobuttonareawidth
end
end

View File

@ -66,6 +66,7 @@ function newobject:initialize()
self.internal = false
self.autoscroll = false
self.masked = false
self.trackindicator = true
self.OnEnter = nil
self.OnTextChanged = nil
self.OnFocusGained = nil
@ -930,6 +931,10 @@ function newobject:UpdateIndicator()
if alltextselected then
self.showindicator = false
else
if love.keyboard.isDown("up", "down", "left", "right") then
self.showindicator = true
end
end
local width = 0
@ -953,7 +958,7 @@ function newobject:UpdateIndicator()
end
-- indicator should be visible, so correcting scrolls
if self.focus then
if self.focus and self.trackindicator then
local indicatorRelativeX = width + self.textoffsetx - self.offsetx
local leftlimit, rightlimit = 1, self:GetWidth() - 1
if self.linenumberspanel then
@ -2106,4 +2111,29 @@ function newobject:ClearLine(line)
return self
end
end
--[[---------------------------------------------------------
- func: SetTrackingEnabled(bool)
- desc: sets whether or not the object should
automatically scroll to the position of its
indicator
--]]---------------------------------------------------------
function newobject:SetTrackingEnabled(bool)
self.trackindicator = bool
return self
end
--[[---------------------------------------------------------
- func: GetTrackingEnabled()
- desc: gets whether or not the object should
automatically scroll to the position of its
indicator
--]]---------------------------------------------------------
function newobject:GetTrackingEnabled()
return self.trackindicator
end

View File

@ -345,4 +345,4 @@ function newobject:GetHorizontalScrollBody()
return item
end
end

View File

@ -43,4 +43,4 @@ skin.controls.columnlistrow_body_hover_color = {255, 173, 51, 255}
skin.controls.menuoption_body_hover_color = {255, 153, 0, 255}
-- register the skin
loveframes.skins.Register(skin)
loveframes.skins.Register(skin)

View File

@ -1 +1 @@
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2012-2014 Kenny Shields -- --]]------------------------------------------------ --[[------------------------------------------------ -- note: This is the base template for all Love Frames objects. You should not edit or delete this template unless you know what you are doing. --]]------------------------------------------------ -- template table local template = {} -- template name template.name = "Base" -- template properties template.properties = {} template.properties["*"] = { state = "none", x = 0, y = 0, width = 5, height = 5, staticx = 0, staticy = 0, draworder = 0, collide = true, internal = false, visible = true, hover = false, alwaysupdate = false, retainsize = false, calledmousefunc = false, skin = nil, clickbounds = nil, Draw = nil, Update = nil, OnMouseEnter = nil, OnMouseExit = nil } return template
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2012-2014 Kenny Shields -- --]]------------------------------------------------ --[[------------------------------------------------ -- note: This is the base template for all Love Frames objects. You should not edit or delete this template unless you know what you are doing. --]]------------------------------------------------ -- template table local template = {} -- template name template.name = "Base" -- template properties template.properties = {} template.properties["*"] = { state = "none", x = 0, y = 0, width = 5, height = 5, staticx = 0, staticy = 0, draworder = 0, collide = true, internal = false, visible = true, hover = false, alwaysupdate = false, retainsize = false, calledmousefunc = false, skin = nil, clickbounds = nil, Draw = nil, Update = nil, OnMouseEnter = nil, OnMouseExit = nil } return template