com.badlogic.gdx.Input.getTextInput()方法的使用及代码示例

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

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

Input.getTextInput介绍

[英]System dependent method to input a string of text. A dialog box will be created with the given title and the given text as a message for the user. Once the dialog has been closed the provided TextInputListener will be called on the rendering thread.
[中]输入文本字符串的系统相关方法。将创建一个对话框,其中包含给定的标题和文本,作为用户的消息。对话框关闭后,将在呈现线程上调用提供的TextInputListener。

代码示例

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

@Override
public void getTextInput (TextInputListener listener, String title, String text, String hint) {
  input.getTextInput(listener, title, text, hint);
}

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

@Override
public void getTextInput (TextInputListener listener, String title, String text, String hint) {
  Gdx.app.getInput().getTextInput(listener, title, text, hint);
}

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

@Override
public void getTextInput (TextInputListener listener, String title, String text, String hint) {
  Gdx.app.getInput().getTextInput(listener, title, text, hint);
}

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

public void create () {
  message = "Touch screen for dialog";
  batch = new SpriteBatch();
  font = new BitmapFont();
  
  Gdx.input.getTextInput(new TextInputListener() {
    @Override
    public void input (String text) {
      message = "message: " + text + ", touch screen for new dialog";
    }
    @Override
    public void canceled () {
      message = "cancled by user";
    }
  }, "enter something funny", "funny", "something funny");
}

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

@Override
public void getTextInput (TextInputListener listener, String title, String text, String hint) {
  Gdx.app.getInput().getTextInput(listener, title, text, hint);
}

代码示例来源:origin: kbz/SIFTrain

Gdx.input.getTextInput(listener, "Offset", "", "Previous value: " + newGlobalOffset + " ms.");
Gdx.input.getTextInput(listener, "Input Offset", "", "Previous value: " + newInputOffset + " ms.");

代码示例来源:origin: Mknsri/Drunk-Toss

scoreToUpload = DrunkToss.prefs.getInteger("hiscore");
Gdx.input.getTextInput(uploadName, "Insert your name", "", "Name");

相关文章