====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
script_scrollbar [2014/06/02 19:37] lm13 [Changelog] |
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 for a desktop | * Purpose : This script will allow you to set up a vertical Scrollbar for a desktop | ||
- | * Author : [[https://plus.google.com/+LukasMorawietz|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 ====== | ||
Line 13: | 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 22: | 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 33: | 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 58: | Line 60: | ||
c.setPosition(0,-pmax*((current-min)/dcount),1,false); | c.setPosition(0,-pmax*((current-min)/dcount),1,false); | ||
} | } | ||
- | </code> | + | </sxh> |