Jump to content

how to create slider bar like that?


rossi46
 Share

Recommended Posts

You'd need a bunch of sprites - one with fixed size for the background, one for the slider button (also fixed size) and one with fixed height and variable width that will stretch along with the slider button.

For the implementation itself... I don't have the time to put something together, but you're probably looking to enable input and drag on the slider button, constrain it so it's only able to move along x; then override the sprite's update() method and disallow it to move past certain points (this can be tricky) and update the other sprite's scale.x (so that it stretches to the needed width).

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...