User Tools

Site Tools


script_scrollbar

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
script_scrollbar [2014/04/02 09:47]
lm13 [About the script]
script_scrollbar [2016/06/28 12:14] (current)
f43nd1r
Line 1: Line 1:
 ====== About the script ====== ====== About the script ======
-  * Purpose : This script will allow you to set up a vertical Scrollbar  +  * Purpose : This script will allow you to set up a vertical Scrollbar ​for a desktop 
-  * Author : Lukas Morawietz alias LM13 +  * Author : F43nd1r 
-  * Current Version : 1.0+  * Current Version : 1.1
   * Link : https://​plus.google.com/​115366157037831519359/​posts/​AmyQ3J8PUyc   * Link : https://​plus.google.com/​115366157037831519359/​posts/​AmyQ3J8PUyc
 +  * //​Deprecated//​
  
 ====== Changelog ====== ​ ====== Changelog ====== ​
   * Version 1.0 (1/4/2014): initial release in wiki   * Version 1.0 (1/4/2014): initial release in wiki
 +  *  Version 1.1 (2/6/2014): added tap
  
 ====== How to use the script ====== ====== How to use the script ======
Line 12: Line 14:
   * enable infinite scrolling in the panel   * enable infinite scrolling in the panel
   * put in the panel on (0,0) an item, give it a nice icon and disable it (set to not clickable)   * put in the panel on (0,0) an item, give it a nice icon and disable it (set to not clickable)
-  * set the script to both desktops and panels positionchanged event+  * set the script to both desktops and panels positionchanged ​event and to  panels tap-on-empty-space ​event
   * set up your configuration at the beginning of the script   * set up your configuration at the beginning of the script
  
Line 21: Line 23:
  
 ====== Script code ====== ====== Script code ======
-<code>//​config+<sxh javascript;>//​config
 var Desktop_Name="​Scrollbar";​ var Desktop_Name="​Scrollbar";​
 var Panel_Name="​Scroll";​ var Panel_Name="​Scroll";​
Line 32: Line 34:
 var c=d.getItemByLabel(Panel_Name).getContainer();​ var c=d.getItemByLabel(Panel_Name).getContainer();​
 var item =c.getItemByLabel(Indicator_Name); ​ var item =c.getItemByLabel(Indicator_Name); ​
 +if(e.getSource()=="​C_CLICK"​)c.setPosition(0,​-e.getTouchScreenY()+item.getHeight()/​2,​1,​false);​
 var cheight=c.getHeight();​ var cheight=c.getHeight();​
 var cpos=c.getPositionY();​ var cpos=c.getPositionY();​
Line 57: Line 60:
 c.setPosition(0,​-pmax*((current-min)/​dcount),​1,​false);​ c.setPosition(0,​-pmax*((current-min)/​dcount),​1,​false);​
 } }
-</code>+</sxh>
script_scrollbar.1396432056.txt.gz · Last modified: 2014/04/02 09:47 by lm13