coronasdk-slider

Turn a display object into a sliding panel

coronasdk-slider

Turn a display object into a sliding panel

Setup lua-loader and then just npm install coronasdk-slider

local Slider = require("coronasdk-slider")
local panel = display.newRect(...)
local slidingpanel = Slider:new({}, panel)
slidingpanel.on("slide") = function (position)
  if "left" == position then print("panel closed") end
  if "right" == position then print("panel open") end
end

Happen to have a TableView widget that you want to slide? Do this:

local tableview = widget.newTableView(...)
local view = tableview[2] -- yes, it's dirty
local slidingpanel = Slider:new({}, view, {moveobject = tableview})

GNU Lesser General Public License (LGPL)