0.0.22

Post Reply
User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

0.0.22

Post by Mr. Kibernetik »

Click on #.image will register an action.

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 0.0.22

Post by Mr. Kibernetik »

The version is published.

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: 0.0.22

Post by rbytes »

This is a very useful innovation. Images can now act as buttons.

I made a quick test script. Tap the image to shrink the height by 10 pixels per tap. The image 1.png needs to be in the Resources folder.

Code: Select all

i = #.image
i.source = "resources\1.png"
#.show(i)
i.x = 200
i.y = 200
> i.height, 0..500
  #.delay(0.001)
<
>
  ? #.act(i), i.height -= 10
<
The opening animation is very smooth.

Do I need to have a slowdown in my loops if just waiting for an action?
Attachments
1.png
1.png (47.65 KiB) Viewed 3789 times
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 0.0.22

Post by Mr. Kibernetik »

rbytes wrote:
Thu Sep 28, 2017 8:18 pm
Do I need to have a slowdown in my loops if just waiting for an action?
Maybe some kind of slowing down function will be needed to make program execution less intensive in waiting loops.
Because there is no need to execute, for example, #.act function million times per second as it is going now.

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: 0.0.22

Post by rbytes »

I usually find a delay of .1 works ok. I don’t always use it if I am in a hurry. :lol:
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 0.0.22

Post by Mr. Kibernetik »

rbytes wrote:
Thu Sep 28, 2017 8:43 pm
I usually find a delay of .1 works ok. I don’t always use it if I am in a hurry. :lol:
#.delay is not a slowing down function, because internally #.delay function's code is also running and consuming CPU.
There should be some kind of special function similar to sB's SLOWDOWN command.

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: 0.0.22

Post by rbytes »

Yes.
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 0.0.22

Post by Mr. Kibernetik »

Mr. Kibernetik wrote:
Thu Sep 28, 2017 8:47 pm
rbytes wrote:
Thu Sep 28, 2017 8:43 pm
I usually find a delay of .1 works ok. I don’t always use it if I am in a hurry. :lol:
#.delay is not a slowing down function, because internally #.delay function's code is also running and consuming CPU.
There should be some kind of special function similar to sB's SLOWDOWN command.
Version 0.0.23 will introduce function #.relax which performs this task.

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: 0.0.22

Post by rbytes »

OK, now I understand what #.relax() is for. :D
The only thing that gets me down is gravity...

Post Reply