本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Image.addListener()
方法的一些代码示例,展示了Image.addListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Image.addListener()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Image
类名称:Image
方法名:addListener
暂无
代码示例来源:origin: libgdx/libgdx
blend.setAlign(Align.center);
blend.setScaling(Scaling.none);
blend.addListener(new InputListener() {
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
if (stage.getBatch().isBlendingEnabled())
rotate.setAlign(Align.center);
rotate.setScaling(Scaling.none);
rotate.addListener(new InputListener() {
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
rotateSprites = !rotateSprites;
scale.setAlign(Align.center);
scale.setScaling(Scaling.none);
scale.addListener(new InputListener() {
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
scaleSprites = !scaleSprites;
代码示例来源:origin: dsaltares/libgdx-cookbook
private void initialize() {
debug();
setTouchable(Touchable.enabled);
levels = new Array<Level>();
buttonLeft.addListener(new ClickListener() {
public void clicked (InputEvent event, float x, float y) {
showPreviousLevel();
}
});
buttonRight.addListener(new ClickListener() {
public void clicked (InputEvent event, float x, float y) {
showNextLevel();
}
});
}
代码示例来源:origin: kotcrab/vis-ui
private VisTable createColorsPreviewTable () {
VisTable table = new VisTable(false);
table.add(currentColorImg = new AlphaImage(commons, 5 * sizes.scaleFactor))
.height(25 * sizes.scaleFactor).width(80 * sizes.scaleFactor).expandX().fillX();
table.add(new Image(style.iconArrowRight)).pad(0, 2, 0, 2);
table.add(newColorImg = new AlphaImage(commons, 5 * sizes.scaleFactor))
.height(25 * sizes.scaleFactor).width(80 * sizes.scaleFactor).expandX().fillX();
currentColorImg.setColor(color);
newColorImg.setColor(color);
currentColorImg.addListener(new ClickListener() {
@Override
public void clicked (InputEvent event, float x, float y) {
restoreLastColor();
}
});
return table;
}
代码示例来源:origin: langurmonkey/gaiasky
float ih = typeImage.getHeight();
typeImage.setSize(iw * scl, ih * scl);
typeImage.addListener(new OwnTextTooltip(dataset.getString("type"), skin, 10));
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
collapseImg.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
代码示例来源:origin: langurmonkey/gaiasky
keyboardImg.addListener(new TextTooltip(txt("gui.tooltip.noinput"), skin));
frameoutputImg = new Image(skin.getDrawable("frameoutput"));
frameoutputImg.addListener(new TextTooltip(txt("gui.tooltip.frameoutputon"), skin));
代码示例来源:origin: Var3D/var3dframe
ActorLine line1=game.getUI(new ActorLine(left,top,right,down)).touchOff().setColor(Color.BLACK).show();
ActorLine line2=game.getUI(new ActorLine(left,down,right,top)).touchOff().setColor(Color.BLACK).show();
img_close.addListener(new ClickListener() {
public void clicked(InputEvent event, float x, float y) {
game.removeDialog();
代码示例来源:origin: Var3D/var3dframe
left.addListener(new ClickListener() {
public void clicked(InputEvent event, float x, float y) {
left.moveBy(10, 0);
内容来源于网络,如有侵权,请联系作者删除!