User Tools

Site Tools


script_rotating_app_wheel

====== 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_rotating_app_wheel [2014/03/11 23:14]
tbog [How to use the script]
script_rotating_app_wheel [2014/03/13 03:00] (current)
tbog [Script code]
Line 1: Line 1:
 ====== About the script ====== ====== About the script ======
-  * Purpose : This script will take all app shortcuts and place them in a circle.+  * Purpose : This script will take all app shortcuts and place them in a circle. When you scroll the container (desktop) the circle will rotate.
   * Author : TBog   * Author : TBog
   * Link: www.google.com/​+BogdanTautuTBog   * Link: www.google.com/​+BogdanTautuTBog
Line 12: Line 12:
   - You can change the order of the items in the circle using “Move forward/​backwards” button. The top-most item is at 12-o'​clock and going clockwise.   - You can change the order of the items in the circle using “Move forward/​backwards” button. The top-most item is at 12-o'​clock and going clockwise.
  
-Caution: on my device (stock i9505 with android 4.4.2) LLX v9.9.7 crashes after i rotate a couple of times.+Caution: on my device (stock i9505 with android 4.4.2) LLX v9.9.7 crashes after i rotate a couple of times. Others do not have this issue.
 TODO: after the crash is fixed i will improve the following: TODO: after the crash is fixed i will improve the following:
   * Make the scrolling infinite   * Make the scrolling infinite
Line 22: Line 22:
 var a = []; var a = [];
 var na = 0; var na = 0;
 +/*how much to rotate, to increase speed multiply with something greater than 1*/
 var offsetRot = c.getPositionX() / c.getWidth() * Math.PI * -2; var offsetRot = c.getPositionX() / c.getWidth() * Math.PI * -2;
 var items = c.getItems();​ var items = c.getItems();​
Line 48: Line 49:
  y+= h2;  y+= h2;
  /* offset to item pivot */  /* offset to item pivot */
- x-= item.getWidth()/​2;​ + x-= a[i].getWidth()/​2;​ 
- y-= item.getHeight()/​2;​+ y-= a[i].getHeight()/​2;​
   
  a[i].setPosition(x,​ y);  a[i].setPosition(x,​ y);
 } }
 </​code>​ </​code>​
script_rotating_app_wheel.1394579644.txt.gz · Last modified: 2014/03/11 23:14 by tbog