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

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

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

Stage.keyUp介绍

[英]Applies a key up event to the actor that has Stage#setKeyboardFocus(Actor), if any, and returns true if the event was Event#handle().
[中]对具有Stage#setKeyboardFocus(actor)(如果有)的参与者应用一个向上键事件,如果该事件是event#handle(),则返回true。

代码示例

代码示例来源:origin: LonamiWebs/Klooni1010

@Override
public boolean keyUp(int keyCode) {
  if (keyCode == Input.Keys.P || keyCode == Input.Keys.BACK) // Pause
    hide();
  return super.keyUp(keyCode);
}

代码示例来源:origin: com.lwgame.gdx/lwgame-core

@Override
  public boolean keyUp(int keycode) {
//        if (keycode == Input.Keys.BACK) {
//            close();
//            return true;
//        }
    return stage.keyUp(keycode) || !isTransparent();
  }

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

@Override
public boolean keyUp(int keycode) {
  if (keycode == Input.Keys.BACK) {
    close();
    return true;
  }
  return stage.keyUp(keycode) || !isTransparent();
}

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

/** Called when a key was released
 * 
 * @param keycode one of the constants in {@link Input.Keys}
 * @return whether the input was processed */
public boolean keyUp (int keycode){
  if($.allMatch(processors(), p -> p.keyUp(keycode)) && onInput()){
    stage.keyUp(keycode);
    return bubble;
  }
  return false;
};

相关文章