List of usage examples for com.badlogic.gdx.scenes.scene2d.ui Button isDisabled
public boolean isDisabled()
From source file:com.vlaaad.dice.util.SoundHelper.java
License:Open Source License
public static void initButton(final Button value) { value.addListener(new InputListener() { @Override/*w w w. j a v a2 s .c om*/ public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) { if (value.isDisabled()) return false; SoundManager.instance.playSound("ui-button-down"); return true; } // @Override public void touchUp(InputEvent event, float x, float y, int pointer, int button) { // if (value.isDisabled() || !value.isOver()) // return; // // } }); value.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { SoundManager.instance.playSound("ui-button-up"); } }); }