TrianguloY

now browsing by tag

 
 

#LLXperiments: Snake

#LLXperiments: Snake

(video preview) https://plus.google.com/u/1/105066926163073195690/posts/amzisQAkQCh

Well, this is not exactly an APK, just a template.

I was planning to build it and share in the Play store, but the process is not easy if you never did it before. Also I don’t have the account on Google play (not with this).

Anyway, as a template you can import it easily without lose your actual setup (thanks Pierre! ) so it’s enough.

It uses scripts, so you need LLX.

In case you never did this before:

– Copy this file

– Place it in the Lightning Launcher folder (make a backup if you don’t know where it is)

– Go to the backup/template screen and select this file.

– Make a backup! Just in case.

I tried to fix all possible bugs, but as usual maybe there are some. (I think the worst will be an error alert, but infinite loops are unpredictable)

Comment here if necessary.

Thanks.

https://www.dropbox.com/s/o2yshz95bcv7k0g/snake
]]>

Double bug report (don’t be aware of the length of this post :P )

Double bug report (don’t be aware of the length of this post 😛 )

I found this while testing, but researching about it I found the root cause, that is specific. This second bug can be something difficult to achieve, depending how LL is saving this data.

Ok, let’s stop writing abstractly. These are the bugs:

[1] The geometry editor don’t want you to use decimals…if you are Spaniard (some other languages as well)

To be honest I can’t say if this bug was here before…maybe it was since the geometry editor was added!

The bug is simple: the float numbers that you can input in the geometry editor takes ‘.’ dots as the separator between decimals. If your mobile phone is set to a language that use this notation, all is ok.

But if, like Spanish and other languages, you use the ‘,’ comma instead, the geometry editor show the number with the comma, as well as the prompt window…so you need to change it to a dot every time you want to input a new number! Remember that it takes the number with dot, no comma.

Solution? Don’t let the system choose the decimal character, or make the editor to also accept commas.

Note: maybe this happen with other float inputs in other settings as well.

[2] half a pixel? Please no

As the title say, it’s physically impossible to have 1/2 pixel (1/3 , 6/19 , …)

So…why you can set the position of items with decimals?

This is not a silly question, and the answer you can think of is: ‘because you can zoom’

Nice try, but no. If an item is at 1.75 it is rounded and placed at 2 even with the biggest zoom. It’s easy to try, just add two identical shortcuts, one placed at ( 0 , 1 ) the other at ( 0.4 , 0.5 ) for example. They will look identical. (Maybe you think this is not very important, it’s only 0.1 more. But remember I’m talking when zoom, and a one pixel line can have the size of the screen, believe me it matters)

So…why? Why don’t just only let the user set it as integers, like with size?

If there is a ‘hidden’ reason, maybe you can alert it when using the .getPositionX/Y … I was crazy trying to figure why my script (will be posted soon) didn’t work with zoom. Then I realized it get fixed just using Math.round( .getPositionX/Y )

(And I have been trying to figure this out since 10.0 version was release. But hey, because of this I found the setPosition(,,,false) bug and this one. Not bad)

Oh, and I also think I know how the .translateIntoScreenCoordX/Y work…because it has also the bug ;)

]]>

Being creative can be a problem sometimes. The busier I am, the more ideas I get.

Being creative can be a problem sometimes. The busier I am, the more ideas I get.

Do you know chromeexperiments? I think I’m going to start a sub community called #LLXperiments .

No, really. I’ll do.

[A new post has been created with a link to the template. Try it if you want! https://plus.google.com/u/1/105066926163073195690/posts/RnF2w7YsGzP ]

]]>

Bug report:

Bug report:

In firsts alphas, you fixed a bug related to the events of a script taking a different containerwhen scrolling…well, it was fixed.

But time to time I had this bug, in latest stable version. Now I think I can provide steps:

In a desktop, different from the main one, set the position change to a script that takes an item LL.getCurrentDesktop().getItemById(#) and a property, for example the PositionY()

Add a folder, don’t open it.

Move a little the desktop (the script will act)

Open the folder.

Press back as crazy (action set to ‘go back’) the folder will close and almost immediately the desktop will change to the main one and ERROR: cannot call method getpositiony of null.

]]>

This is something I’m working on.

This is something I’m working on.

1) they are folders, each one have a panel and a shortcut without icon (the title)

2) it need to ‘commit’ the position/size values of the folder, that’s why it is very laggy, and the reason this won’t be a final script.

3) moving the folder from the title will move the whole window

4) pinch to zoom will change the size of the folder, both dimensions simultaneously (I tried separately, but I couldn’t find a good way)

5) clicking the folder title will close it

6) I’m not going to post the script yet I have some ideas to try and few time, but I’ll do so others can test and maybe discover faster ways of do it (aka, less lag)

7) but hey! It looks good, doesn’t it? ;)

Oh, I almost forget. The idea was from Danbar’s suggestion

#LLXperiments

]]>

The script repository is growing, and all the scripts in a list can be as chaotic as Google+ posts (sorry for the…

The script repository is growing, and all the scripts in a list can be as chaotic as Google+ posts (sorry for the bad joke 😛 )

That’s why I decided to put them in categories.

These are the ones I thought about. You can suggest others.

Also, if you think it’s a bad idea it’s easy to restore the list, no problem.

]]>

Some of you know this app, but in case you don’t this is an app that now lets you compile 9.png files.

Some of you know this app, but in case you don’t this is an app that now lets you compile 9.png files. No need to use the computer or made an apk!

The app is easy to use, the only thing you need to know is that you need the image (this is not a painter app, but I can recommend some good ones) and once you have it just select the borders/margins (if you don’t know what are they, go check what a 9.png file is) and save. It also has a built-in previewer to see the result.

Then you can use the complied picture in LL or where you want.

Note: this was an old app that could only save non-compiled pictures. I asked the developer, and now he finally update it to save compiled ones. As he says in the description, this can have bugs even thought I tested and seems ok.

https://play.google.com/store/apps/details?id=me.denley.android.ninepatch
]]>

Question to scripters:

Question to scripters:

I want to set the position of a desktop with animation (‘true’) and then I want to do some other things.

The problem is that setPosition(x,y,s,true) is processed separately, I mean, the rest of the script is immediately run after, while the desktop is scrolling.

What I’m doing now is to launch the rest of the code with a timeout after some millisecond, but I was looking for a ‘more exact’ way.

Do you know any? Do you think the API will need to have a dedicated function?

]]>

API suggestion:

API suggestion:

Now I’m playing with items and zoom. I realized that take the ‘bounding box’ of an item is easy with the getPosition and the getHeight/Width…but:

If the scale is different you need to multiply by it.

If the rotation is different you need to do some trigonometric operations.

If the skew is different…

So my suggestion is, since the launcher already know the values (in edit mode you can see the box)

What about:

Rect item.getBoundingBox()

Like the container, but with items.

]]>

Can someone explain me why the setPosition() of a container with a scale different from 1 is working well when the…

Can someone explain me why the setPosition() of a container with a scale different from 1 is working well when the animation is set to true, but extremely wrong with false?

]]>