【发布时间】:2016-08-09 13:15:34
【问题描述】:
这是我的代码:
Gdx.input.setInputProcessor(this);
bagImage = new Image(new Texture("bag.png"));
bagButton = new ImageButton(bagImage.getDrawable());
bagButton.setSize(125, 125);
bagButton.addListener(new ClickListener() {
public void clicked(InputEvent event, float x, float y) {
Gdx.app.debug("DEBUG", "clicked");
}
});
}
如果我点击按钮,什么都不会发生。为什么?
【问题讨论】:
标签: libgdx onclick onclicklistener imagebutton