com.badlogic.gdx.scenes.scene2d.Stage.removeCaptureListener()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中com.badlogic.gdx.scenes.scene2d.Stage.removeCaptureListener()方法的一些代码示例,展示了Stage.removeCaptureListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Stage.removeCaptureListener()方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.Stage
类名称:Stage
方法名:removeCaptureListener

Stage.removeCaptureListener介绍

[英]Removes a listener from the root.
[中]从根目录中删除侦听器。

代码示例

代码示例来源:origin: libgdx/libgdx

protected void setStage (Stage stage) {
    Stage oldStage = getStage();
    if (oldStage != null) {
      oldStage.removeCaptureListener(hideListener);
      oldStage.removeListener(list.getKeyListener());
    }
    super.setStage(stage);
  }
}

代码示例来源:origin: libgdx/libgdx

protected void setStage (Stage stage) {
    Stage oldStage = getStage();
    if (oldStage != null) {
      oldStage.removeCaptureListener(hideListener);
      oldStage.removeListener(list.getKeyListener());
    }
    super.setStage(stage);
  }
}

代码示例来源:origin: libgdx/libgdx

public void hide () {
  if (!list.isTouchable() || !hasParent()) return;
  list.setTouchable(Touchable.disabled);
  Stage stage = getStage();
  if (stage != null) {
    stage.removeCaptureListener(hideListener);
    stage.removeListener(list.getKeyListener());
    if (previousScrollFocus != null && previousScrollFocus.getStage() == null) previousScrollFocus = null;
    Actor actor = stage.getScrollFocus();
    if (actor == null || isAscendantOf(actor)) stage.setScrollFocus(previousScrollFocus);
  }
  clearActions();
  selectBox.onHide(this);
}

代码示例来源:origin: libgdx/libgdx

public void hide () {
  if (!list.isTouchable() || !hasParent()) return;
  list.setTouchable(Touchable.disabled);
  Stage stage = getStage();
  if (stage != null) {
    stage.removeCaptureListener(hideListener);
    stage.removeListener(list.getKeyListener());
    if (previousScrollFocus != null && previousScrollFocus.getStage() == null) previousScrollFocus = null;
    Actor actor = stage.getScrollFocus();
    if (actor == null || isAscendantOf(actor)) stage.setScrollFocus(previousScrollFocus);
  }
  clearActions();
  selectBox.onHide(this);
}

代码示例来源:origin: com.badlogicgames.gdx/gdx

public void hide () {
  if (!list.isTouchable() || !hasParent()) return;
  list.setTouchable(Touchable.disabled);
  Stage stage = getStage();
  if (stage != null) {
    stage.removeCaptureListener(hideListener);
    if (previousScrollFocus != null && previousScrollFocus.getStage() == null) previousScrollFocus = null;
    Actor actor = stage.getScrollFocus();
    if (actor == null || isAscendantOf(actor)) stage.setScrollFocus(previousScrollFocus);
  }
  clearActions();
  selectBox.onHide(this);
}

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

public void hide() {
  if (!list.isTouchable() || !hasParent())
    return;
  list.setTouchable(Touchable.disabled);
  Stage stage = getStage();
  if (stage != null) {
    stage.removeCaptureListener(hideListener);
    if (previousScrollFocus != null && previousScrollFocus.getStage() == null)
      previousScrollFocus = null;
    Actor actor = stage.getScrollFocus();
    if (actor == null || isAscendantOf(actor))
      stage.setScrollFocus(previousScrollFocus);
  }
  clearActions();
  getColor().a = 1;
  addAction(sequence(fadeOut(0.15f, Interpolation.fade), Actions.removeActor()));
}

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

return;
stage.removeCaptureListener(hideListener);
stage.addCaptureListener(hideListener);
stage.addActor(this);

代码示例来源:origin: com.badlogicgames.gdx/gdx

public void show (Stage stage) {
  if (list.isTouchable()) return;
  stage.removeCaptureListener(hideListener);
  stage.addCaptureListener(hideListener);
  stage.addActor(this);

相关文章