[example] How to make a configurable Slider

0 favourites
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • capx

    capx for touch

    You can set min and max value in instance variable of sld_line object.

    As well as a snapped boolean if you want your slider to snap on rounded values.

    The sliders now use container to associate the button, the line and the eventual textbox object.

  • Thanks for this! I was just about to implement a volume slider in my project <img src="smileys/smiley4.gif" border="0" align="middle" />. Great work!

  • hahah nice!

    I just made myself a slider yesterday :P

  • Yann you should really write tutorials!

  • Massive thanks for this Yann! Would have taken me quite a bit of time to throw together a slider myself and this covers every aspect of a slider I could imagine needing for my own projects.

    Got a project I'll be posting up shortly using the slider code.

    Cheers,

    David

  • Yann you should really write tutorials!

    That's what I am saying all along...

  • Thanx!

    Awesome work! <img src="smileys/smiley17.gif" border="0" align="middle" />

  • Ugotsta

    It lakes only one thing: setting the slider position given a value. For now it only do the opposite.

    All

    You're welcome \o/

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi Yann,

    How can I identify each one of the slider's instances that I use in order to send their values to a group of different global variables?

    I don't find the way to get their instance ID!

    Thanks a lot in advance.

  • Heptagono

    Might this behavior could help you make a slider easily.

  • Heptagono

    Add an instance variable in the slid_line object and assign different value to each of your object.

    This way you can pick the one you want.

    for instance let say you create the instance variable 'name' for your slid_line.

    +slid_line: name = "option2"
      -> System: set option2 to slid_line.value
  • Question, how would i attach sound volume to one of these sliders?

  • as described in the post just before

    you create an instance variable named 'name' for slid_line

    and you set the value of 'name' for your volume slid_line object to "volume"

    +slid_line: name = "volume"
      -> Audio: set "your tag" volume to slid_line.value
  • Thankyou Thankyou Thankyou !Thankyou!!! Yann you are "THE" LEGEND. saved my poor burned retina's from Hours of Work......You rock...!! I will credit you in my upcoming game...for the Slider code!!!

  • Hello Yann,

    I've tried a lot to modify your capx to support Touch instead of Mouse without success.

    There is a way I can use the touch to move the slider instead of click of the mouse?

    So I can use it on mobile device.

    Can you help me, please?

    I'm stuck on this example.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)