Jump to content

Phaser interface slider button


oler
 Share

Recommended Posts

Hi again potential helpers..I need a slider with image buttons for my phaser client interface like the demo examples here:  http://skidding.github.io/dragdealer/#demos

 

here is a screenshot of my slider : http://i.imgur.com/RDchikM.png   note I need for the right side of the slider to remain hidden if the slider button is not at the maximum

 

can anybody provide examples or any tutorials on how to accomplish this...I don't want to reinvent the wheel as time is limited and I have searched high and low for phaser examples....

 

or alternatively how would one use the jquery plugin in a phaser game instance for example? thank you so much for your help

Link to comment
Share on other sites

With a bit of that

http://www.html5gamedevs.com/topic/1730-click-sprite-and-button-question/

 

I would do something like that

// sliderBar.input.start();

 

 

if (sliderBar.input.pointerDown(game.input.activePointer.id)){

   

if(sliderBtn.x<sliderBar.x+sliderBar.width || sliderBtn.x>sliderBar.x){sliderBtn.x = game.input.worldX;}

 

}

 

Not tested so I can't guarantee it fully works, but you get the idea.

 

It's cheap, but it should do the trick I guess.

Link to comment
Share on other sites

Ok thanks, I will try this and get back..any other solutions just in case?

 

 

With a bit of that

http://www.html5gamedevs.com/topic/1730-click-sprite-and-button-question/

 

I would do something like that

// sliderBar.input.start();

 

 

if (sliderBar.input.pointerDown(game.input.activePointer.id)){

   

if(sliderBtn.x<sliderBar.x+sliderBar.width || sliderBtn.x>sliderBar.x){sliderBtn.x = game.input.worldX;}

 

}

 

Not tested so I can't guarantee it fully works, but you get the idea.

 

It's cheap, but it should do the trick I guess.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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