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

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

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

Stage.addListener介绍

[英]Adds a listener to the root.
[中]将侦听器添加到根目录。

代码示例

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

stage.addListener(list.getKeyListener());

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

stage.addListener(list.getKeyListener());

代码示例来源:origin: peakgames/libgdx-stagebuilder

private void addFocusChangedListenerToStage() {
  this.stage.addListener(new FocusListener() {
    @Override
    public void keyboardFocusChanged(FocusEvent event, Actor actor,
        boolean focused) {
      if(focused && actor instanceof TextField) {
        textFieldFocusChanged(actor.getName());
      }
    }
  });
}

代码示例来源:origin: moribitotech/MTX

/**
 * Back button
 * */
private void setBackBackButton() {
  stage.addListener(new InputListener() {
    @Override
    public boolean keyUp(InputEvent event, int keycode) {
      if (keycode == Keys.BACK || keycode == Keys.ESCAPE) {
        if (isBackButtonActive) {
          keyBackPressed();
        }
      }
      return false;
    }
  });
}

代码示例来源:origin: kotcrab/vis-ui

@Override
protected void setStage (Stage stage) {
  super.setStage(stage);
  if (stage != null) stage.addListener(stageListener);
}

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

@Override
protected void setStage(Stage stage) {
  super.setStage(stage);
  if (stage != null)
    stage.addListener(stageListener);
}

代码示例来源:origin: moribitotech/MTX

private void setUpSwipeListener() {
  getStage().addListener(new ActorGestureListener() {

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

ui.addListener(new EventListener() {

代码示例来源:origin: oakes/libgdx-examples

stage.addListener(new InputListener() {
  public boolean handle(Event e) {
    float x = Gdx.input.getX() - blockWidth / 2;

代码示例来源:origin: oakes/libgdx-examples

timer.start();
stage.addListener(new InputListener() {
  public boolean keyDown(InputEvent event, int keycode) {
    if (activePiece == null) {

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

stage.addListener(new EventListener() {

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

ui.addListener(new EventListener() {

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

stage.addListener(new EventListener() {

代码示例来源:origin: kotcrab/vis-editor

stage.addListener(new InputListener() {
  boolean debug = false;

代码示例来源:origin: dingjibang/GDX-RPG

stage.addListener(new InputListener(){
  public boolean keyDown(InputEvent event, int keycode) {
    skip();

相关文章