Dim background when folder open

Dim background when folder open

For a video look here: https://plus.google.com/115366157037831519359/posts/3ZY4BWnZbmp

On desktop:

– create an item

– disable it

– hide label and icon

– set label to “bg”

– set content color to black (not transparent)

set up configuration:

– dim has to be the same value in both scripts

-speed can be different

Set in folders resume event:

/*config */

var speed=10;//lower is faster, 1 for instant

var dim=150;//0 for nothing, 255 for solid black

var orientationfix=false;//true if you want to switch screen orientation while folder open

/*endconfig */

var d=LL.getCurrentDesktop();

var i=d.getItemByLabel(“bg”);

var p=i.getProperties();

d.setItemZIndex(i.getId(),d.getItems().getLength()-1);

p.edit().setBoolean(“i.onGrid”,false).setString(“i.pinMode”,”XY”).commit();

if(orientationfix){

var s=Math.max( d.getWidth(),d.getHeight())*1.1;

i.setSize(s,s);}

else i.setSize( d.getWidth(),d.getHeight());

i.setPosition(0,0);

var i=0;

var a=function()

{

i++;

p.edit().setInteger(“i.alpha”,i*dim/speed).commit();

if(i

}

a();

Set in folders paused event:

/*config */

var speed=10;//lower is faster, 1 for instant

var dim=150;//0 for nothing, 255 for solid black

/*endconfig */

var p=LL.getCurrentDesktop().getItemByLabel(“bg”).getProperties();

var i=speed;

var a=function()

{

i–;

p.edit().setInteger(“i.alpha”,i*dim/speed).commit();

if(i>0)setTimeout(a,0);

}

a();

]]>
« (Previous Post)
(Next Post) »

5 Commentsto Dim background when folder open

  1. Anonymous says:

    < ![CDATA[

    (Check Google+ syntax)

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Ty. always the same -.-

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Hi, was trying this script on a folder on my homescreen, it said: Setup (header) At line 40: TypeError Cannot call method “getType” of null (setup#40) I pushed Disable and then all my homescreen went dim and I can’t get it back to normal whatever I do (uninstall your script – it was apk 1.2, reinstall, clear apk cache, LLX cache, block scripts in LLX settings, restart LLX, homescreen is still dim) please help

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Edit Layout, hierarchy, find item labeled Bg and delete it…


    However I don’t understand that error

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Thanx, that helped.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *