【发布时间】:2015-09-14 11:24:14
【问题描述】:
我是舞台类和演员的新手,我知道按钮就是演员,所以我创建了一个:
public void create(){
buttonAtlas=new TextureAtlas(Gdx.files.internal("buttons/button.pack"));
skin=new Skin();
skin.addRegions(buttonAtlas);
buttonStyle=new Button.ButtonStyle();
buttonStyle.up=skin.getDrawable("animation00");
buttonStyle.down=skin.getDrawable("animation01");
button=new Button(buttonStyle);
button.setPosition(200,700);
stage=new Stage();
stage.addActor(button); //the problem is that nothing happens.
}
如果你能解释一下什么是舞台和演员,那将非常有帮助。
【问题讨论】:
-
你读过wiki吗?如果不够清楚,请提出更具体的问题,
标签: java button libgdx actor stage