Minigame time! It is not Breakout, sorry, but a more launcher-involved game.

Minigame time! It is not Breakout, sorry, but a more launcher-involved game.

Find the items

This will hide a custom number of items (they are small with the lightning’s icon) inside all containers of your desktop/desktops (If you have a simple one it will be very easy. The more folders/panels you have, the funnier it will be! )

When hidden you simply need to find and click them. When all are found you can start a new game.

It can be useful to help you remember your setup, you need to open and search in all places. Maybe there is a hidden folder you don’t remember about!

Because sometimes the items are really well hidden (or even where you doesn’t expect an item can be) launching the script while there are hidden items, shows the position of a random one.

Instructions when no game is on: Run the script, select whether to use all desktops or only the current one, and the number of items to hide.

Note: items are randomly placed inside the reachable containers and always inside the bounding box. However due to lightning’s loading process, sometimes items are placed at 0,0.

Another note: When launching the script it checks that the hidden items are still in the launcher, so if a hidden item is deleted, the script won’t tell you it is still hidden.

Have fun!

]]>
« (Previous Post)

5 Commentsto Minigame time! It is not Breakout, sorry, but a more launcher-involved game.

  1. Anonymous says:

    < ![CDATA[

    var script=LL.getCurrentScript();


    var data=LL.getEvent().getData();


    var eventItem=LL.getEvent().getItem();



    var saved=JSON.parse(script.getTag()||”[]”);



    for(var t=0;t


    if(LL.getItemById(saved[t])==null)


    saved.splice(t–,1);




    if(data==”item”)clicked();


    else if(saved.length!=0) help();


    else newGame();



    script.setTag(JSON.stringify(saved));








    function newGame(){



    var useall=confirm(“Do you want to use all desktops? Cancel to use only the current one”);



    var items=LL.pickNumericValue(“Choose the number of items to hide:”,5,”INT”,1,10,1,”items”);



    if(items==null) return;




    var ids = [];



    if(useall){


    var ds=LL.getAllDesktops();


    for(var t=0;t


    }else{


    add(LL.getCurrentDesktop());


    }



    function add(c){


    if(ids.indexOf(c.getId()+””)!=-1) return;


    ids.push(c.getId()+””);


    var its=c.getItems();


    for(var i=0;i


    var it=its.getAt(i);


    if(it.getType()==”Folder”||it.getType()==”Panel”)add(it.getContainer());


    }


    }







    saved=[];



    var intent=Intent.parseUri(“#Intent;component=net.pierrox.lightning_launcher_extreme/net.pierrox.lightning_launcher.activities.Dashboard;i.a=35;S.d=”+script.getId()+”%2Fitem;end”,0);



    var icon=LL.createImage(“net.pierrox.lightning_launcher_extreme”, “icon”);




    for(var t=0;t



    var randomc=ids[Math.floor(Math.random()*ids.length)];



    var it=LL.getContainerById(randomc).addShortcut(“&&&&&& GAME &&&&&”,intent,0,0);



    var pr=it.getProperties().edit();


    pr


    .setBoolean(“i.rotate”,false)


    .setBoolean(“i.enabled”,true)


    .setInteger(“i.alpha”,255)


    .setString(“i.pinMode”,”NONE”)


    .setBoolean(“i.onGrid”,false)


    .setBoolean(“s.labelVisibility”,false)


    .setBoolean(“s.iconVisibility”,true)


    .setFloat(“s.iconScale”,1)


    .setBoolean(“s.iconReflection”,false)


    .setBoolean(“s.iconFilter”,false)


    .setFloat(“s.iconEffectScale”,1)


    .setInteger(“s.iconColorFilter”,-1);



    pr.getBox(“i.box”)


    .setSize(“ml,mt,mr,mb,bl,bt,br,bb,pl,pt,pr,pb”,0);



    pr.commit();




    it.setCustomIcon(icon);



    it.setSize(icon.getWidth(),icon.getHeight());



    it.setScale(0.5,0.5);



    var box=LL.getContainerById(randomc).getBoundingBox();



    var x=box.getLeft()+(box.getRight()-box.getLeft()-it.getWidth())*Math.random();



    var y=box.getTop()+(box.getBottom()-box.getTop()-it.getHeight())*Math.random();




    it.setPosition(x,y);



    saved.push(it.getId());



    }




    Android.makeNewToast(“Items hidden\n Gotta find them all!”,false).show();




    }





    function clicked(){



    var index=saved.indexOf(eventItem.getId());



    if(index==-1){


    alert(“This item wasn’t on my database!”);


    return;


    }



    eventItem.getParent().removeItem(eventItem);



    saved.splice(index,1);



    if(saved.length>0)


    Android.makeNewToast(“Item found! There are still “+saved.length+” item”+(saved.length==1?””:”s”)+” hidden”,false).show();


    else alert(“Congratulations! you found all hidden items”);



    }






    function help(){



    if(confirm(“There are still “+saved.length+” items hidden. Do you want to see “+(saved.length==1?”it”:”one of them”)+”?”)){



    var item=saved[Math.floor(Math.random()*saved.length)];



    showItemMenu(LL.getItemById(item));



    }



    }









    function showItemMenu(item){



    LL.runAction(EventHandler.EDIT_LAYOUT,item,null);



    LL.runAction(EventHandler.ITEM_MENU,item,null);




    }

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Wow! I like it!

    ]]>

  3. Anonymous says:

    < ![CDATA[

    are you available for creating a script for battery widget like Gauge battery widget ?

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Bruno-Isa LAMOUR-ARNOULD sorry but no. I’m not really sure why, but when I try to think how to do it, nothing convinces me.

    ]]>

  5. Anonymous says:

    < ![CDATA[

    TrianguloY just because it would be great to have all in LLx. Bye bye 3rd party widget. Sounds a good reason,no ?

    ]]>

Leave a Reply

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