ScaleTo scaleBy doesn't work for ImageButton - LIBGDX

I'm trying to scale the ImageButton after the button is clicked, but it seems that it has no effect. I also tried adding an ImageButton to the table and then resizing the table, but it also doesn't work. Actions like fadeIn, fadeOut and moveTo work.

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

      

What could be the problem?

+3


source to share


1 answer


You should try adding btnPlay.setTransform (true)

Check it:



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

+7


source







All Articles