Search in sources :

Example 1 with TextInputListener

use of com.badlogic.gdx.Input.TextInputListener in project libgdx by libgdx.

the class TextInputDialogTest method create.

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");
}
Also used : BitmapFont(com.badlogic.gdx.graphics.g2d.BitmapFont) SpriteBatch(com.badlogic.gdx.graphics.g2d.SpriteBatch) TextInputListener(com.badlogic.gdx.Input.TextInputListener)

Aggregations

TextInputListener (com.badlogic.gdx.Input.TextInputListener)1 BitmapFont (com.badlogic.gdx.graphics.g2d.BitmapFont)1 SpriteBatch (com.badlogic.gdx.graphics.g2d.SpriteBatch)1