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

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

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

Stage.removeListener介绍

[英]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: kotcrab/vis-ui

@Override
public boolean remove () {
  if (getStage() != null) getStage().removeListener(stageListener);
  if (activeSubMenu != null) activeSubMenu.remove();
  setActiveItem(null, false);
  parentSubMenu = null;
  activeSubMenu = null;
  return super.remove();
}

代码示例来源:origin: langurmonkey/gaiasky

@Override
public boolean remove() {
  if (getStage() != null)
    getStage().removeListener(stageListener);
  if (activeSubMenu != null)
    activeSubMenu.remove();
  setActiveItem(null, false);
  parentSubMenu = null;
  activeSubMenu = null;
  return super.remove();
}

相关文章