Java 类com.badlogic.gdx.backends.gwt.widgets.TextInputDialogBox 实例源码

项目:TinyVoxel    文件:GwtInput.java   
@Override
public void getPlaceholderTextInput (TextInputListener listener, String title, String placeholder) {
    TextInputDialogBox dialog = new TextInputDialogBox(title, null, placeholder);
    final TextInputListener capturedListener = listener;
    dialog.setListener(new TextInputDialogListener() {
        @Override
        public void onPositive (String text) {
            if (capturedListener != null) {
                capturedListener.input(text);
            }
        }

        @Override
        public void onNegative () {
            if (capturedListener != null) {
                capturedListener.canceled();
            }
        }
    });
}
项目:vtm    文件:GwtInput.java   
@Override
public void getPlaceholderTextInput(TextInputListener listener, String title, String placeholder) {
    TextInputDialogBox dialog = new TextInputDialogBox(title, null, placeholder);
    final TextInputListener capturedListener = listener;
    dialog.setListener(new TextInputDialogListener() {
        @Override
        public void onPositive(String text) {
            if (capturedListener != null) {
                capturedListener.input(text);
            }
        }

        @Override
        public void onNegative() {
            if (capturedListener != null) {
                capturedListener.canceled();
            }
        }
    });
}