mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
This commit is contained in:
commit
ff861631c4
@ -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)
|
||||
|
7
init.lua
7
init.lua
@ -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")
|
||||
|
@ -984,4 +984,3 @@ function newobject:SetColumnOrder(curid, newid)
|
||||
return self
|
||||
|
||||
end
|
||||
|
@ -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
|
||||
@ -2107,3 +2112,28 @@ function newobject:ClearLine(line)
|
||||
return self
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user