Example usage for com.badlogic.gdx.scenes.scene2d.ui ImageButton ImageButton

List of usage examples for com.badlogic.gdx.scenes.scene2d.ui ImageButton ImageButton

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d.ui ImageButton ImageButton.

Prototype

public ImageButton(Drawable imageUp, Drawable imageDown, Drawable imageChecked) 

Source Link

Usage

From source file:presentation.abstraction.AStage.java

License:Open Source License

/**
 * Put in stage sound and audio buttons.
 */// ww w .  j  a v  a2 s .  c om
protected void createAudioButton() {
    // Put audio buttons.
    if (buttonAudio == null) {
        Drawable imageUp, imageDown;
        imageUp = new TextureRegionDrawable(ResourcesCommos.buttonAudioUp);
        imageDown = new TextureRegionDrawable(ResourcesCommos.buttonAudioDown);
        buttonAudio = new ImageButton(imageUp, imageDown, imageDown);
        buttonAudio.addListener(new ChangeListener() {

            @Override
            public void changed(ChangeEvent event, Actor actor) {
                SettingManager.pauseOrResumeAudio();
            }
        });
    }
}