Browse Search Popular Register Upload Rules User list Login:
Search:
Input Box Code Injector

Image:
screenshot of the scene

Author: s_noonan

Group: Technical

Filesize: 252 kB

Date added: 2019-07-23

Rating: 5.6

Downloads: 282

Views: 281

Comments: 8

Ratings: 2

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

Input Box Code Injector

Rev A: Added _onOK, _onCancel, and _onExit event handlers.
Rev B: math.toInt(math.toFloat(response)) was math.toInt(response).
Last edited at 2019/08/01 10:10:42 by s_noonan
Please log in to rate this scene
edit
Similar scenes
Title: Code Injector v2.0
Rating: 5
Filesize: 116.35 kB
Downloads: 416
Comments: 2
Ratings: 1
Date added: 2024/06/20 03:18:15
Made with: Algodoo v2.2.3
Rating: rated 5
download
Title: Code Injector v1.0
Rating: 5
Filesize: 65.11 kB
Downloads: 219
Comments: 1
Ratings: 1
Date added: 2024/06/16 17:50:27
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Shade's Toolbox
Rating: 5
Filesize: 28.96 kB
Downloads: 281
Comments: 1
Ratings: 1
Date added: 2018/09/21 22:49:07
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Fuel injector
Rating: 7.5
Filesize: 80.72 kB
Downloads: 322
Comments: 3
Ratings: 10
Date added: 2008/08/11 00:15:44
Made with: Phun
Rating: rated 7.5
download
Title: AlgoCode Factory
Rating: 5
Filesize: 166.26 kB
Downloads: 3861
Comments: 10
Ratings: 1
Date added: 2022/10/09 11:30:59
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Input Box
Rating: 5.625
Filesize: 119.9 kB
Downloads: 1571
Comments: 9
Ratings: 2
Date added: 2015/04/07 09:55:46
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
I don't understand it
What does it do?
Q: What does it do?
A: It helps you keep track of the number of teeth you have.

I added a "Purpose" description to the scene. Read that and then let me know if you still don't understand.
Initial Value can be a word or a short text message. It doesn't have to be a numeric value.

This could be useful as an input tool for a game. Nice work! :tup:
- So it is pop out window where you can rewrite output to different number right?
But why it will display CANCEL when I press cancel? Shoudn't it just leave old input?
- That description is pretty complex, even for me, still Idk how I should use this in my scene, where the output value is etc.
Maybe my brain is just turned off:lol:
- I like those textures:tup: 10/10
When I click on the Exit button, the word "Exit" displays in the box, replacing the previous value. Is it supposed to do that?
Q: When I click on the Exit button, the word "Exit" displays in the box, replacing the previous value. Is it supposed to do that?
A: Yes.

Q: But why it will display CANCEL when I press cancel?
A: Because that's what the code tells it to do.

Q: Shouldn't it just leave old input?
A: What it should or shouldn't do is up to you.

Here's the deal. The code injector puts the code in the box, but it doesn't do everything for you. You still need to code the _setResponse event. Maybe something like this:

_inputBoxIsVisible = false;
response == "Cancel" || response == "Exit" ? {}:{ textScale = 0.5; text = "Nobody cares that you have " + response + " teeth."};

I had it display "Cancel" and "Exit" just to show you that it returns the button that was pressed in those cases.
I have 32.5 teeth. Is that normal? :lol:
Q: I have 32.5 teeth. Is that normal?
A: No.

math.toInt("32") works OK while math.toInt("32.5") returns "error". I fixed that.