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")
|
||||
|
@ -1 +1 @@
|
||||
return {}
|
||||
return {}
|
||||
|
@ -176,4 +176,4 @@ function loveframes.templates.ApplyToObject(object)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -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
|
||||
|
@ -1272,4 +1272,4 @@ function newobject:GetState()
|
||||
|
||||
return self.state
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -292,4 +292,4 @@ function newobject:GetToggleable()
|
||||
|
||||
return self.toggleable
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -454,4 +454,4 @@ function newobject:GetEnabled()
|
||||
|
||||
return self.enabled
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -368,4 +368,4 @@ function newobject:GetOpen()
|
||||
|
||||
return self.open
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -984,4 +984,3 @@ function newobject:SetColumnOrder(curid, newid)
|
||||
return self
|
||||
|
||||
end
|
||||
|
@ -342,4 +342,4 @@ function newobject:GetName()
|
||||
|
||||
return self.name
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -397,4 +397,4 @@ function newobject:GetCellPadding()
|
||||
|
||||
return self.cellpadding
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -417,4 +417,4 @@ function newobject:GetImageHeight()
|
||||
return image:getHeight()
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -337,4 +337,4 @@ function newobject:GetImageHeight()
|
||||
return image:getHeight()
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -184,4 +184,4 @@ function newobject:GetAutoPosition()
|
||||
|
||||
return self.autoposition
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -454,4 +454,4 @@ function newobject:GetHorizontalScrollBody()
|
||||
|
||||
return false
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -243,4 +243,4 @@ function newobject:GetSelected()
|
||||
|
||||
return self.selected
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -165,4 +165,4 @@ function newobject:GetOffsetY()
|
||||
|
||||
return self.offsety
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -252,4 +252,4 @@ function newobject:SetFunction(func)
|
||||
|
||||
self.func = func
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -104,4 +104,4 @@ function newobject:draw()
|
||||
drawfunc(self)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -429,4 +429,4 @@ function newobject:Close()
|
||||
self:Remove()
|
||||
self.list.haslist = false
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -183,4 +183,4 @@ function newobject:GetText()
|
||||
|
||||
return self.text
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -236,4 +236,4 @@ function newobject:GetBarType()
|
||||
|
||||
return self.bartype
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -387,4 +387,4 @@ function newobject:GetBarType()
|
||||
|
||||
return self.bartype
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -224,4 +224,4 @@ function newobject:GetScrollBar()
|
||||
|
||||
return self.internals[1].internals[1]
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -166,4 +166,4 @@ function newobject:GetScrollType()
|
||||
|
||||
return self.scrolltype
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -255,4 +255,4 @@ function newobject:MoveToY(y)
|
||||
|
||||
self.staticy = y
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -231,4 +231,4 @@ function newobject:GetTabNumber()
|
||||
|
||||
return self.tabnumber
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -394,4 +394,4 @@ function newobject:GetFollowObject()
|
||||
|
||||
return self.followobject
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -303,4 +303,4 @@ function newobject:GetOpen()
|
||||
|
||||
return self.open
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -141,4 +141,4 @@ function newobject:mousepressed(x, y, button)
|
||||
print(self.parent.level)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -812,4 +812,4 @@ function newobject:GetDTScrolling()
|
||||
|
||||
return self.dtscrolling
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -329,4 +329,4 @@ function newobject:SetVisible(bool)
|
||||
|
||||
return self
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -451,4 +451,4 @@ function newobject:GetEnabled()
|
||||
|
||||
return self.enabled
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -524,4 +524,4 @@ function newobject:GetDecimals()
|
||||
|
||||
return self.decimals
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -173,4 +173,4 @@ function newobject:mousereleased(x, y, button)
|
||||
v:mousereleased(x, y, button)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -351,4 +351,4 @@ function newobject:GetText()
|
||||
|
||||
return self.text
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -553,4 +553,4 @@ function newobject:GetEnabled()
|
||||
|
||||
return self.enabled
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -763,4 +763,4 @@ function newobject:GetAutoButtonAreaWidth()
|
||||
|
||||
return self.autobuttonareawidth
|
||||
|
||||
end
|
||||
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
|
||||
@ -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
|
||||
|
@ -345,4 +345,4 @@ function newobject:GetHorizontalScrollBody()
|
||||
|
||||
return item
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -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)
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user