Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input events broken for Text objects #20

Open
derrick56007 opened this issue Dec 23, 2014 · 0 comments
Open

Input events broken for Text objects #20

derrick56007 opened this issue Dec 23, 2014 · 0 comments

Comments

@derrick56007
Copy link

Hi, the input events for Text objects seem to be broken
example:

  create() {
    TextStyle style = new TextStyle(font:'100px Arial', fill: 'white');
    Text play = game.add.text(0, game.world.centerY, 'Play', style);
    play.inputEnabled = true;

    //this doesn't work
    play.events.onInputDown.add((a, b) {
      print("play");
    }, 1);

    Sprite sprite = game.add.sprite(game.world.centerX + 64, game.world.centerY, 'grass');
    sprite.inputEnabled = true;

    //this does
    sprite.events.onInputDown.add((a, b) {
      print("grass");
    }, 1);
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant