Browse Search Popular Register Upload Rules User list Login:
Search:
Better slider

Image:
screenshot of the scene

Author: The Linkage

Group: Default

Filesize: 26.52 kB

Date added: 2019-06-30

Rating: 6.5

Downloads: 1299

Views: 376

Comments: 6

Ratings: 4

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

Just an idea I've been toying around with since s_noonan released his GUI kit. Writes the value to an easy-to-set scene.my.variable, and has adjustable min/max values. Also you can resize the slider or the slider rail and it'll still work.

Hide the axle (move it to the back) if you'll use it, it is there to expose the id transfer system.

Only modify the values that start with _0 (_0utputVariable, _0utputMinMax...)

To use:
> Define your variable in the console (for example, define "scene.my.output = 0.0" without the "")
> Write the name of the variable on the _0utputVariable of the slider, between "" (example _0utputVariable = "scene.my.output")
> Set your desired min/max values on _0utputMinMax of the slider.
It could be [0,100] or [-10, 25] or whatever you want. they can even be inverted as in [10,-10]
> Move the axle to back and enjoy the sliderization

Edit: Guess i'll use the LED display for something after all
Last edited at 2019/07/02 05:16:14 by The Linkage
Please log in to rate this scene
edit
Similar scenes
Title: Slider mobile phone !!!!!!!!
Rating: 5.4
Filesize: 17.57 kB
Downloads: 1445
Comments: 0
Ratings: 4
Date added: 2009/09/30 01:18:07
Made with: Phun
Rating: rated 5.4
download
Title: gas operated pistol mk2
Rating: 6.1429
Filesize: 251.58 kB
Downloads: 456
Comments: 4
Ratings: 7
Date added: 2009/03/08 22:08:35
Made with: Phun
Rating: rated 6.1
download
Title: Slider Crank with Chain
Rating: 6.1111
Filesize: 27.73 kB
Downloads: 681
Comments: 3
Ratings: 3
Date added: 2011/11/02 21:38:28
Made with: Algodoo v1.8.5
Rating: rated 6.1
download
Title: car slider
Rating: 6.1111
Filesize: 213.44 kB
Downloads: 13039
Comments: 1
Ratings: 3
Date added: 2022/01/15 18:37:01
Made with: Algodoo v2.1.0
Rating: rated 6.1
download
Title: Slider climer
Rating: 5
Filesize: 2.72 MB
Downloads: 737
Comments: 0
Ratings: 1
Date added: 2023/04/05 10:23:51
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Two Stroke Engine with Smoke and Fuel
Rating: 6.1
Filesize: 156.55 kB
Downloads: 3350
Comments: 0
Ratings: 4
Date added: 2013/05/29 21:55:02
Made with: Algodoo v2.1.0
Rating: rated 6.1
download
The slider works great. Very responsive.

Just a couple of minor suggestions: 1. Disable those annoying Algodoo clouds. It doesn't make sense to have clouds rolling by in a technical scene. 2. You can have playmode automatically toggle on and off with the simulation like this: In upDate in any geometry place this script: {app.gui.playMode = sim.running} Then you would have no need for a button to click on.

Overall, Nice job! :tup:

Edit: Oh, one more tip. I always change the Font Resolution to 128 in any geometry which is displaying text (alpha or numeric). The parameter is located in the Text menu. Try it, and you will see how much better the text looks with finer detail.
Last edited at 2019/07/01 04:44:43 by Xray
- If you make automatical playmode PLEASE tell us where did you place that
- I'm really frustrated when I have to find that stupid piece of code

After testing your scene
- Thanks god for that toggle button, I mean you can simply press shift+space to do that, but still better than Xray idea (no offence Xray,
don't ban me please, you know I mean it in a good way, please, I'll be a good user, I'll do everyting I want, just don't ban me :lol: )
- Nice slider, I like that you can click on "rail" and slider will jump there
10/10 :tup: :tup: :tup:
@Xray:
-Why don't you just delete the cloud image file from your Algodoo installation folder? Lol

-That is literally the snippet of code that my scene uses, but I also added the option to turn it off when the scene is running (by clicking the button). It used to be that the play mode got enabled when you hovered over the slider, but there's a slight delay and Algodoo freezes for a fraction of a second; it was bearable but not ideal. Plus, I think you should actually take this as feedback; I hate not having a button to turn play mode off while the scene runs. In this case Play Mode is enabled when the scene starts and disabled when the scene is paused, unless you hit the button in which case it will not be enabled.

-I know about 128 text, it's more of a style - i just like how 12 text looks with high alpha value (around 200, 300)


Jakub just said it right above this comment... It's better to be able to DISABLE the automatic play mode without having to pause, then mess with the scene's code...

EDIT: There was a very strange bug; for some reason play mode gets enabled even though the code shouldn't let it do that at all (the scene was obviously uploaded with play mode off). Anyhow it's fixed now.
Last edited at 2019/07/02 02:07:54 by The Linkage
the Play Mode button works as it should now, but I suspect a massive bug, since playMode would be either off or dependent of sim.running - no chance that play mode would be on with the scene paused. idk. anyhow this is not related to the actual slider
Last edited at 2019/07/02 02:40:40 by The Linkage
A bug, in Algodoo???? :o No, it can't be! Impossible! :lol:
Nice work. Fast response. Tight code. Easy to use. No need to do any math.:tup:
I see how you set _initRelMPos. I didn't know you could do that.
Last edited at 2019/07/02 10:11:06 by s_noonan