Jump to content

"Force" a state on a button


Recommended Posts

Buttons have four states, relative to pointer events (over, out, down, up), and Phaser has some handy features for that, for example defining a frame on a spritesheet for each one of these events. This leads me to this situation: I want buttons to be interacted with using either pointer or keyboard/gamepad input. Can I "force" the button to be in a certain state depending on non-pointer input?

On a related note, are there "state booleans" like "isUp" or "isDown" for states? That'd be immensely helpful for some things, such as implementing a workaround for the above in case that isn't a feature.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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