Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Phaser buttons & hover effect


danbruegge
 Share

Recommended Posts

Hi,
 
i don't know what is wrong with my code, but the button hover will not work correctly.
 
Here is my button code:

self.buttons.start = self.game.add.button(    parseInt(self.game.width / 2, 10),    parseInt(self.game.height / 2, 10),    'buttonSprite',    function () {        self.clickAction();    },    self,    4,    7,    5,    6);self.buttons.newCreep.anchor.set(0.5); self.buttons.newCreep.input.useHandCursor = true;

When my mouse cursor enters the button, it will display the hover image. But if it leaves, the hover image won't disappear. Its still frame 4, not frame 7.
 
I can't figure out whats wrong with this code.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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