// Path: core/src/de/tomgrill/gdxdialogs/core/GDXDialogsVars.java
// public class GDXDialogsVars {
// 	public static final String VERSION = "1.3.0";
// 	public static final String LOG_TAG = "gdx-dialogs (" + VERSION + ")";
// }
// 
// Path: core/src/de/tomgrill/gdxdialogs/core/dialogs/GDXTextPrompt.java
// public interface GDXTextPrompt {
// 
// 	/**
// 	 * Type of input used by the textfield
// 	 */
// 	enum InputType {
// 		/**
// 		 * prints readable text
// 		 */
// 		PLAIN_TEXT,
// 
// 		/**
// 		 * hides typed text behind specified character
// 		 */
// 		PASSWORD
// 	}
// 
// 	/**
// 	 * Sets the title
// 	 *
// 	 * @param title String value to set the title
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setTitle(CharSequence title);
// 
// 
// 	/**
// 	 * Set the character limit for input. Default is 16.
// 	 *
// 	 * @param maxLength
// 	 * @return
// 	 */
// 	GDXTextPrompt setMaxLength(int maxLength);
// 
// 	/**
// 	 * Shows the dialog. show() can only be called after build() has been called
// 	 * else there might be strange behavior. Runs asynchronously on a different thread.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt show();
// 
// 	/**
// 	 * Dismisses the dialog. You can show the dialog again.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt dismiss();
// 
// 	/**
// 	 * This builds the button and prepares for usage.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt build();
// 
// 	/**
// 	 * Sets the message.
// 	 *
// 	 * @param message The text to be displayed at the body of the dialog. Desktop implementation will ignore this method.
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setMessage(CharSequence message);
// 
// 	/**
// 	 * Sets the default value for the input field.
// 	 *
// 	 * @param inputTip Placeholder for the text input field.
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setValue(CharSequence inputTip);
// 
// 	/**
// 	 * Sets the label for the cancel button on the dialog.
// 	 *
// 	 * @param label Text of the cancel button
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setCancelButtonLabel(CharSequence label);
// 
// 	/**
// 	 * Sets the label for the confirm button on the dialog.
// 	 *
// 	 * @param label Text of the confirm button
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setConfirmButtonLabel(CharSequence label);
// 
// 	/**
// 	 * Sets the {@link TextPromptListener}
// 	 *
// 	 * @param listener listener to be called when the event is triggered
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setTextPromptListener(TextPromptListener listener);
// 
// 	/**
// 	 * Sets the type of input for the text input field.
// 	 *
// 	 * @param inputType type of input
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setInputType(InputType inputType);
// }
// 
// Path: core/src/de/tomgrill/gdxdialogs/core/listener/TextPromptListener.java
// public interface TextPromptListener {
// 
// 	public void cancel();
// 
// 	public void confirm(String text);
// 
// }


import com.badlogic.gdx.Gdx;
import de.tomgrill.gdxdialogs.core.GDXDialogsVars;
import de.tomgrill.gdxdialogs.core.dialogs.GDXTextPrompt;
import de.tomgrill.gdxdialogs.core.listener.TextPromptListener;
import javax.swing.*;
    public GDXTextPrompt show() {
        new Thread(new Runnable() {

            @Override
            public void run() {
                Gdx.app.debug(GDXDialogsVars.LOG_TAG,
                        DesktopGDXTextPrompt.class.getSimpleName() + " now shown");

                JPanel panel = new JPanel();
                panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
                JLabel label = new JLabel(message.toString());

                JTextField textField;
                switch (inputType) {
                    case PASSWORD:
                        textField = new JPasswordField();
                        textField.setText(String.valueOf(value));
                        break;

                    case PLAIN_TEXT:
                    default:
                        textField = new JTextField();
                        textField.setText(String.valueOf(value));
                }

                panel.add(label);
                panel.add(textField);

                String[] options = new String[]{(String) confirmButtonLabel, (String) cancelButtonLabel};
                int response = JOptionPane.showOptionDialog(
// Path: core/src/de/tomgrill/gdxdialogs/core/GDXDialogsVars.java
// public class GDXDialogsVars {
// 	public static final String VERSION = "1.3.0";
// 	public static final String LOG_TAG = "gdx-dialogs (" + VERSION + ")";
// }
// 
// Path: core/src/de/tomgrill/gdxdialogs/core/dialogs/GDXTextPrompt.java
// public interface GDXTextPrompt {
// 
// 	/**
// 	 * Type of input used by the textfield
// 	 */
// 	enum InputType {
// 		/**
// 		 * prints readable text
// 		 */
// 		PLAIN_TEXT,
// 
// 		/**
// 		 * hides typed text behind specified character
// 		 */
// 		PASSWORD
// 	}
// 
// 	/**
// 	 * Sets the title
// 	 *
// 	 * @param title String value to set the title
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setTitle(CharSequence title);
// 
// 
// 	/**
// 	 * Set the character limit for input. Default is 16.
// 	 *
// 	 * @param maxLength
// 	 * @return
// 	 */
// 	GDXTextPrompt setMaxLength(int maxLength);
// 
// 	/**
// 	 * Shows the dialog. show() can only be called after build() has been called
// 	 * else there might be strange behavior. Runs asynchronously on a different thread.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt show();
// 
// 	/**
// 	 * Dismisses the dialog. You can show the dialog again.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt dismiss();
// 
// 	/**
// 	 * This builds the button and prepares for usage.
// 	 *
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt build();
// 
// 	/**
// 	 * Sets the message.
// 	 *
// 	 * @param message The text to be displayed at the body of the dialog. Desktop implementation will ignore this method.
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setMessage(CharSequence message);
// 
// 	/**
// 	 * Sets the default value for the input field.
// 	 *
// 	 * @param inputTip Placeholder for the text input field.
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setValue(CharSequence inputTip);
// 
// 	/**
// 	 * Sets the label for the cancel button on the dialog.
// 	 *
// 	 * @param label Text of the cancel button
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setCancelButtonLabel(CharSequence label);
// 
// 	/**
// 	 * Sets the label for the confirm button on the dialog.
// 	 *
// 	 * @param label Text of the confirm button
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setConfirmButtonLabel(CharSequence label);
// 
// 	/**
// 	 * Sets the {@link TextPromptListener}
// 	 *
// 	 * @param listener listener to be called when the event is triggered
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setTextPromptListener(TextPromptListener listener);
// 
// 	/**
// 	 * Sets the type of input for the text input field.
// 	 *
// 	 * @param inputType type of input
// 	 * @return The same instance that the method was called from.
// 	 */
// 	GDXTextPrompt setInputType(InputType inputType);
// }
// 
// Path: core/src/de/tomgrill/gdxdialogs/core/listener/TextPromptListener.java
// public interface TextPromptListener {
// 
// 	public void cancel();
// 
// 	public void confirm(String text);
// 
// }


// Path: desktop/src/de/tomgrill/gdxdialogs/desktop/dialogs/DesktopGDXTextPrompt.java
import com.badlogic.gdx.Gdx;
import de.tomgrill.gdxdialogs.core.GDXDialogsVars;
import de.tomgrill.gdxdialogs.core.dialogs.GDXTextPrompt;
import de.tomgrill.gdxdialogs.core.listener.TextPromptListener;
import javax.swing.*;

    public GDXTextPrompt show() {
        new Thread(new Runnable() {

            @Override
            public void run() {
                Gdx.app.debug(GDXDialogsVars.LOG_TAG,
                        DesktopGDXTextPrompt.class.getSimpleName() + " now shown");

                JPanel panel = new JPanel();
                panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
                JLabel label = new JLabel(message.toString());

                JTextField textField;
                switch (inputType) {
                    case PASSWORD:
                        textField = new JPasswordField();
                        textField.setText(String.valueOf(value));
                        break;

                    case PLAIN_TEXT:
                    default:
                        textField = new JTextField();
                        textField.setText(String.valueOf(value));
                }

                panel.add(label);
                panel.add(textField);

                String[] options = new String[]{(String) confirmButtonLabel, (String) cancelButtonLabel};
                int response = JOptionPane.showOptionDialog(
                        null,