1
我有一個圖像,我想註冊觸摸,使其只有在用戶在觸摸後將其手指從屏幕上擡起(在同一區域內提供其stil的情況下)時纔會激活..不會立即點擊。我正在嘗試使用TouchUp,如文檔所述,但無濟於事Libgdx touchUp對圖像不起作用
large_jackpot.addListener(new InputListener() {
public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
Gdx.app.log("Example", "touch started at (" + x + ", " + y + ")");
return true;
}
public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
Gdx.app.log("Example", "touch done at (" + x + ", " + y + ")");
app.setScreen(app.loadingScreen);
}
});