March, 2014
now browsing by month
Customizable Wheel of items
Customizable Wheel of items
First Bogdan Tautu wrote the script to put shortcuts in a circle, then he improved it to make a rotating one (availables in the wiki)…I decided to go a bit far modifying it. This is a customizable wheel of items. It can be improved more, but I think this is enough.
This script will use all the items in the container, that’s why I recommend to use a panel.
Challenge to scripters: can you imagine how I made to rotate the items relative to the wheel (so they always look to the center) without looking at the script?
Settings:
– X position: -1 left ; 0 center ; 1 right
– Y position: -1 bottom ; 0 center ; 1 top
– Rotation: the rotation the items will have relative to itself (recommended 0 or 180)
– Sensitivity: the velocity of rotating (the more, the faster)
Instructions:
– copy paste the script.
set it in the ‘position changed’ of the panel (or desktop).
– IMPORTANT: pin the items, and detach them from the grid.
– In the panel settings, check the ‘no scroll limit’ under scroll options.
– Wheeeeeeeel
Of course you can ask in the comments any problem you could have.
—————————————–
/*Config: */
var h = -1; //horizontal alignment (-1 , 0 , 1 )
var v = 0; //vertical alignment ( -1 , 0 , 1 )
var r = 0; //rotation offset ( 0 = default) in angles, not very implemented (0 or 180 recommended)
var f = 2; //sensitivity
var event = LL.getEvent();
var desktop = event.getContainer();
var a = desktop.getItems();
var na = a.getLength();
var radius = Math.min( desktop.getHeight()/ (v==0?4:2) , desktop.getWidth()/ (h==0?4:2) );
var alt = 0.5;
var size = [ radius*(2-alt)*Math.PI/na , radius*2 ];
var desf = (desktop.getPositionX()*(v>0?-1:1)+desktop.getPositionY() *(h>0?-1:1) )*Math.PI/desktop.getWidth();
desf*=f;
for ( var i=0; i var angle = Math.PI*2*i/na-desf; var x = Math.cos( angle -Math.PI/2 ) * radius; var y = Math.sin( angle -Math.PI/2 ) * radius; var rot = angle*180/Math.PI+r; x+= (h<0? 0 : desktop.getWidth()/ (h==0? 2 : 1) ) ; y+= (v>0? 0 : desktop.getHeight()/ (v==0? 2 : 1) ); x-= size[0]/2; y-= size[1]/2; var t = a.getAt(i); t.setRotation(0); t.setSize(size[0] ,size[1]); t.setPosition(x, y); t.setRotation(rot); }
setting focus only on tap, not on scroll: implemented
When I do something like scrolling in a panel, and then add an item outside of the panel, the item often moves into the panel.
All items on my home screen vanished after reboot.
This is embarrassing, and someone please point me to the FAQ where I might find the answer, but I just downloaded LL…
1.
2. How can I set the old background but still have a custom one on that desktop?
]]>The autocompletion popup is bigger, good.
The autocompletion popup is bigger, good.
But…how about an intermediate size? Maybe at the right, no full width.
]]>v9.9.13 beta
(edit: 9.9.13 not 9.9.12)
Available now, with the following changes:
– improved position of the suggestion view in the script editor
– improved a bit the items hierarchy menu
– script: use float for Container.translateIntoScreenCoordX/Y()
– split grid and stack folder icons in items+background, so that the background can be changed separately using the icon effect background option. Use a blank image to clear the background.
– script: fix event Y position
– script: fix Container.getType()
– ability to set a label for all items, not just shortcuts and folders. Option found in the “+” tab
– script: renamed Container.getItemByName(String name) to Container.getItemByLabel(String label)
– script: Container.getItemByLabel(String label) can now be used to retrieve all kind of items
– script: moved Item.setLabel and item.getLabel from Shortcut to Item, add a “persistent” option to setLabel
Thank you for your patience !
]]>