0.0.22
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
0.0.22
Click on #.image will register an action.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 0.0.22
The version is published.
- 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:
- Contact:
Re: 0.0.22
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.
The opening animation is very smooth.
Do I need to have a slowdown in my loops if just waiting for an action?
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
<
Do I need to have a slowdown in my loops if just waiting for an action?
- Attachments
-
- 1.png (47.65 KiB) Viewed 3821 times
The only thing that gets me down is gravity...
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 0.0.22
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.
- 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:
- Contact:
Re: 0.0.22
I usually find a delay of .1 works ok. I don’t always use it if I am in a hurry.
The only thing that gets me down is gravity...
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 0.0.22
#.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.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: 0.0.22
Version 0.0.23 will introduce function #.relax which performs this task.Mr. Kibernetik wrote: ↑Thu Sep 28, 2017 8:47 pm#.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.
- 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:
- Contact:
Re: 0.0.22
OK, now I understand what #.relax() is for.
The only thing that gets me down is gravity...