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

screenshot of the scene

Author: The Linkage

Group: Default

Filesize: 26.52 kB

Date added: 2019-06-30

Rating: 6.5

Downloads: 805

Views: 141

Comments: 6

Ratings: 4

Times favored: 0

Made with: Algodoo v2.1.0


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, 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 " = 0.0" without the "")
> Write the name of the variable on the _0utputVariable of the slider, between "" (example _0utputVariable = "")
> 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
Similar scenes
Title: friction slider
Rating: 5
Filesize: 1.9 kB
Downloads: 450
Comments: 0
Ratings: 1
Date added: 2009/10/05 18:59:34
Made with: Algodoo before v1.8.5
Rating: rated 5
Title: [Insert image here]
Rating: 5
Filesize: 12.89 kB
Downloads: 185
Comments: 4
Ratings: 1
Date added: 2019/01/25 21:54:39
Made with: Algodoo v2.1.0
Rating: rated 5
Title: 4 bar , slider crank mechanism
Rating: 5.25
Filesize: 11.66 kB
Downloads: 289
Comments: 0
Ratings: 2
Date added: 2010/04/30 04:31:33
Made with: Algodoo before v1.8.5
Rating: rated 5.3
Title: Slider Crank with Chain
Rating: 6.1111
Filesize: 27.73 kB
Downloads: 589
Comments: 3
Ratings: 3
Date added: 2011/11/02 21:38:28
Made with: Algodoo v1.8.5
Rating: rated 6.1
Title: Two Stroke Engine with Smoke and Fuel
Rating: 6.1
Filesize: 156.55 kB
Downloads: 2977
Comments: 0
Ratings: 4
Date added: 2013/05/29 21:55:02
Made with: Algodoo v2.1.0
Rating: rated 6.1
Title: osu! Slider Concept
Rating: 5
Filesize: 80.33 kB
Downloads: 141
Comments: 2
Ratings: 1
Date added: 2016/01/26 00:12:28
Made with: Algodoo v2.1.0
Rating: rated 5
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:
-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