====== 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:39] lm13 [How to use 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 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 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> |