rossi46 Posted September 29, 2016 Share Posted September 29, 2016 I want to create slider bar in phaser like this piicture. How to do that. thanks. Demo in js: http://jsfiddle.net/devcurry_com/JSmWM/ Link to comment Share on other sites More sharing options...
in mono Posted September 29, 2016 Share Posted September 29, 2016 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 More sharing options...
rossi46 Posted September 30, 2016 Author Share Posted September 30, 2016 Thanks. I did it. Link to comment Share on other sites More sharing options...
Alexalten Posted September 30, 2016 Share Posted September 30, 2016 Hi, there is a plugin, in Phaser, that make it simple to manage: http://slick-ui.com/preview/slider.html http://slick-ui.com/ Try it, bye, Alex in mono 1 Link to comment Share on other sites More sharing options...
rossi46 Posted October 1, 2016 Author Share Posted October 1, 2016 On 9/30/2016 at 3:15 PM, Alexalten said: Hi, there is a plugin, in Phaser, that make it simple to manage: http://slick-ui.com/preview/slider.html http://slick-ui.com/ Try it, bye, Alex thanks Link to comment Share on other sites More sharing options...
Recommended Posts