Skip to content
Turn a display object into a sliding panel
Find file
Latest commit df44302 @wscherphof v0.0.1-1
Failed to load latest commit information.
.gitignore v0.0.1 v0.0.1 <br />
init.lua v0.0.1
package.json v0.0.1-1


Turn a display object into a sliding panel


1. Install

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

2. Require

local Slider = require("coronasdk-slider")

3. Have fun

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

Now the user can swipe your panel. But you can also let it swipe by code, e.g. when the user taps a certain button: slidingpanel.slide("left") or slidingpanel.slide("right")

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)

Something went wrong with that request. Please try again.