3

I'm trying to scale an ImageButton after a button click but it seems it doesn't have any effect. I've also tried adding the ImageButton to a table and then scale the table but it doesn't work also. Actions like fadeIn, fadeOut , and moveTo work though.

    btnPlay.addListener( new ClickListener() {             
        @Override
        public void clicked(InputEvent event, float x, float y) {
            imagebutton.addAction(scaleBy(10f, 10f, 2f));
        };
    });

What can be the problem?

gogonapel
  • 788
  • 6
  • 17

1 Answers1

7

You should try to add btnPlay.setTransform(true)

Check this:

http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/Group.html#setTransform-boolean-

Ocfmem
  • 356
  • 1
  • 7