User Tools

Site Tools


script_sidebar_anim

====== 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
Last revision Both sides next revision
script_sidebar_anim [2014/04/02 13:47]
tbog [How to use the script]
script_sidebar_anim [2014/04/16 12:44]
tbog [How to use the script]
Line 25: Line 25:
         * Match edges: Left         * Match edges: Left
   * Set the script on the Position changed event of the desktop   * Set the script on the Position changed event of the desktop
 +
 +**Important!**
 +Replace 0x40004 and 0x40005 from the script with the ids of your panels.
 ====== Script code ====== ====== Script code ======
 <​code>​ <​code>​
Line 37: Line 40:
 var ww = w-cell; var ww = w-cell;
 var x = c.getPositionX()/​ww;​ var x = c.getPositionX()/​ww;​
 +ww = ww/2;
  
 if (x <= 0) if (x <= 0)
- pLeft.setPosition(-ww/2 + x*ww/2, pLeft.getPositionY());​+ pLeft.setPosition(-ww + x*ww, pLeft.getPositionY());​
  
 if (x >= 0) if (x >= 0)
- pRight.setPosition(cell + ww/2 + x*ww/2, pRight.getPositionY());​+ pRight.setPosition(cell + ww + x*ww, pRight.getPositionY());​
 </​code>​ </​code>​
script_sidebar_anim.txt ยท Last modified: 2014/05/03 20:33 by tbog