Search in sources :

Example 1 with TextFieldListener

use of com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener in project AmazingMaze by TheVirtualMachine.

the class ContinueScreen method highScoreDialog.

/**
	 * Displays the high score dialog.
	 */
public void highScoreDialog() {
    Label.LabelStyle labelStyle = new Label.LabelStyle(game.assets.getFont(Assets.MONO_REGULAR, Assets.SMALL_FONT_SIZE), Color.WHITE);
    final Dialog dialog = new Dialog("High Score", game.assets.skin);
    final TextButton okButton = new TextButton("OK", game.assets.skin);
    dialog.getButtonTable().bottom();
    Label label = new Label("Enter your name:", labelStyle);
    label.setScale(.5f);
    label.setWrap(true);
    label.setAlignment(Align.center);
    final TextField nameField = new TextField("", game.assets.skin);
    dialog.add(label).width(500).pad(50);
    dialog.add(nameField);
    dialog.add(okButton).bottom();
    nameField.setTextFieldListener(new TextFieldListener() {

        @Override
        public void keyTyped(TextField textField, char key) {
            name = formatString(nameField.getText());
            if (!name.equals("")) {
                if (key == (char) 13) {
                    displayHighScores(name);
                }
            }
        }
    });
    okButton.addListener(new ChangeListener() {

        @Override
        public void changed(ChangeEvent event, Actor actor) {
            name = formatString(nameField.getText());
            if (!name.equals("")) {
                if (okButton.isPressed()) {
                    dialog.hide();
                    displayHighScores(name);
                }
            }
        }
    });
    dialog.addListener(new InputListener() {

        @Override
        public boolean keyDown(InputEvent event, int keycode) {
            name = formatString(nameField.getText());
            if (!name.equals("")) {
                if (keycode == Keys.ENTER) {
                    displayHighScores(name);
                    return true;
                }
            }
            return false;
        }
    });
    dialog.show(stage);
}
Also used : TextButton(com.badlogic.gdx.scenes.scene2d.ui.TextButton) Label(com.badlogic.gdx.scenes.scene2d.ui.Label) InputListener(com.badlogic.gdx.scenes.scene2d.InputListener) Dialog(com.badlogic.gdx.scenes.scene2d.ui.Dialog) Actor(com.badlogic.gdx.scenes.scene2d.Actor) TextField(com.badlogic.gdx.scenes.scene2d.ui.TextField) TextFieldListener(com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener) ChangeListener(com.badlogic.gdx.scenes.scene2d.utils.ChangeListener) InputEvent(com.badlogic.gdx.scenes.scene2d.InputEvent)

Example 2 with TextFieldListener

use of com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener in project bladecoder-adventure-engine by bladecoder.

the class PropertyTable method addProperty.

public void addProperty(String name, String value, Types type) {
    table.row();
    table.add(new Label(name, skin)).expandX().left();
    if (type == Types.BOOLEAN) {
        SelectBox<String> sb = new SelectBox<String>(skin);
        sb.setItems(BOOLEAN_VALUES);
        if (value != null)
            sb.setSelected(value);
        sb.setName(name);
        table.add(sb).expandX().left();
        sb.addListener(new ChangeListener() {

            @SuppressWarnings("unchecked")
            @Override
            public void changed(ChangeEvent event, Actor actor) {
                updateModel(actor.getName(), ((SelectBox<String>) actor).getSelected());
            }
        });
    } else {
        TextField tf = new TextField(value == null ? "" : value, skin);
        tf.setName(name);
        table.add(tf).expandX().left();
        if (type == Types.INTEGER)
            tf.setTextFieldFilter(new TextField.TextFieldFilter.DigitsOnlyFilter());
        tf.setTextFieldListener(new TextFieldListener() {

            @Override
            public void keyTyped(TextField actor, char c) {
                if (c == 13) {
                    // ENTER KEY
                    updateModel(actor.getName(), ((TextField) actor).getText());
                    EditorLogger.debug("Updating property: " + actor.getName());
                }
            }
        });
        tf.addListener(new FocusListener() {

            @Override
            public void keyboardFocusChanged(FocusEvent event, Actor actor, boolean focused) {
                if (!focused) {
                    updateModel(actor.getName(), ((TextField) actor).getText());
                    EditorLogger.debug("Updating property: " + actor.getName());
                }
            }
        });
    }
}
Also used : SelectBox(com.badlogic.gdx.scenes.scene2d.ui.SelectBox) Label(com.badlogic.gdx.scenes.scene2d.ui.Label) Actor(com.badlogic.gdx.scenes.scene2d.Actor) TextField(com.badlogic.gdx.scenes.scene2d.ui.TextField) ChangeListener(com.badlogic.gdx.scenes.scene2d.utils.ChangeListener) TextFieldListener(com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener) FocusListener(com.badlogic.gdx.scenes.scene2d.utils.FocusListener)

Example 3 with TextFieldListener

use of com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener in project ProjektGG by eskalon.

the class LobbyScreen method initUI.

@Override
protected void initUI() {
    // backgroundTexture = assetManager.get(BACKGROUND_IMAGE_PATH);
    Sound clickSound = assetManager.get(BUTTON_SOUND);
    // mainTable.setBackground(skin.getDrawable("parchment-small"));
    ImageTextButton leaveButton = new ImageTextButton("Verlassen", skin);
    leaveButton.addListener(new InputListener() {

        public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
            clickSound.play(1F);
            game.getNetworkHandler().disconnect();
            game.pushScreen("mainMenu");
            return true;
        }
    });
    NetworkHandler netHandler = game.getNetworkHandler();
    readyUpLobbyButton = new ImageTextButton("Bereit", skin);
    if (netHandler.isHost()) {
        readyUpLobbyButton.setDisabled(true);
        readyUpLobbyButton.setText("Spiel starten");
    }
    readyUpLobbyButton.addListener(new InputListener() {

        public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
            clickSound.play(1F);
            getLocalPlayer().toggleReady();
            netHandler.onLocalPlayerChange(getLocalPlayer());
            updateLobbyUI();
            return true;
        }
    });
    Table playerTable = new Table();
    Table settingsTable = new Table();
    Table buttonTable = new Table();
    Table chatTable = new Table();
    // settings table + player table
    buttonTable.add(readyUpLobbyButton).bottom().padBottom(20).row();
    buttonTable.add(leaveButton);
    Table chatInputTable = new Table();
    ImageTextButton sendButton = new ImageTextButton("Senden", skin);
    TextField chatInputField = new TextField("", skin);
    chatInputField.setTextFieldListener(new TextFieldListener() {

        @Override
        public void keyTyped(TextField textField, char key) {
            if (!textField.getText().isEmpty() && (key == (char) 13)) {
                // Enter
                clickSound.play(1F);
                netHandler.sendChatMessage(chatInputField.getText());
                onNewChatMessage(new NewChatMessagEvent(localNetworkId, chatInputField.getText()));
                chatInputField.setText("");
            }
        }
    });
    sendButton.addListener(new InputListener() {

        public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
            if (!chatInputField.getText().isEmpty()) {
                clickSound.play(1F);
                netHandler.sendChatMessage(chatInputField.getText());
                onNewChatMessage(new NewChatMessagEvent(localNetworkId, chatInputField.getText()));
                chatInputField.setText("");
            }
            return true;
        }
    });
    messagesArea = new TextArea("", skin);
    messagesArea.setDisabled(true);
    ScrollPane messagesPane = new ScrollPane(messagesArea);
    chatInputTable.add(chatInputField).left().width(325).padRight(15);
    chatInputTable.add(sendButton);
    chatTable.debug();
    chatTable.add(messagesPane).height(125).width(425).top().row();
    chatTable.add(chatInputTable).left().padTop(10).width(425).bottom();
    playerSlots = new Table[6];
    playerSlots[0] = new Table();
    playerSlots[1] = new Table();
    playerSlots[2] = new Table();
    playerSlots[3] = new Table();
    playerSlots[4] = new Table();
    playerSlots[5] = new Table();
    playerTable.add(playerSlots[0]).height(25).width(425).row();
    playerTable.add(playerSlots[1]).height(25).width(425).row();
    playerTable.add(playerSlots[2]).height(25).width(425).row();
    playerTable.add(playerSlots[3]).height(25).width(425).row();
    playerTable.add(playerSlots[4]).height(25).width(425).row();
    playerTable.add(playerSlots[5]).height(25).width(425).row();
    mainTable.add(playerTable).width(425).height(155);
    mainTable.add(settingsTable).width(155).row();
    mainTable.add(chatTable).height(165).bottom();
    mainTable.add(buttonTable).height(165);
    mainTable.setDebug(true);
// updateLobbyUI();
}
Also used : ImageTextButton(com.badlogic.gdx.scenes.scene2d.ui.ImageTextButton) Table(com.badlogic.gdx.scenes.scene2d.ui.Table) TextArea(com.badlogic.gdx.scenes.scene2d.ui.TextArea) Sound(com.badlogic.gdx.audio.Sound) InputListener(com.badlogic.gdx.scenes.scene2d.InputListener) ScrollPane(com.badlogic.gdx.scenes.scene2d.ui.ScrollPane) NewChatMessagEvent(de.gg.event.NewChatMessagEvent) TextField(com.badlogic.gdx.scenes.scene2d.ui.TextField) NetworkHandler(de.gg.network.NetworkHandler) TextFieldListener(com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener) InputEvent(com.badlogic.gdx.scenes.scene2d.InputEvent)

Example 4 with TextFieldListener

use of com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener in project libgdx by libgdx.

the class UITest method create.

@Override
public void create() {
    skin = new Skin(Gdx.files.internal("data/uiskin.json"));
    texture1 = new Texture(Gdx.files.internal("data/badlogicsmall.jpg"));
    texture2 = new Texture(Gdx.files.internal("data/badlogic.jpg"));
    TextureRegion image = new TextureRegion(texture1);
    TextureRegion imageFlipped = new TextureRegion(image);
    imageFlipped.flip(true, true);
    TextureRegion image2 = new TextureRegion(texture2);
    // stage = new Stage(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), false, new PolygonSpriteBatch());
    stage = new Stage(new ScreenViewport());
    Gdx.input.setInputProcessor(stage);
    // Group.debug = true;
    ImageButtonStyle style = new ImageButtonStyle(skin.get(ButtonStyle.class));
    style.imageUp = new TextureRegionDrawable(image);
    style.imageDown = new TextureRegionDrawable(imageFlipped);
    ImageButton iconButton = new ImageButton(style);
    Button buttonMulti = new TextButton("Multi\nLine\nToggle", skin, "toggle");
    Button imgButton = new Button(new Image(image), skin);
    Button imgToggleButton = new Button(new Image(image), skin, "toggle");
    Label myLabel = new Label("this is some text.", skin);
    myLabel.setWrap(true);
    Table t = new Table();
    t.row();
    t.add(myLabel);
    t.layout();
    final CheckBox checkBox = new CheckBox(" Continuous rendering", skin);
    checkBox.setChecked(true);
    final Slider slider = new Slider(0, 10, 1, false, skin);
    slider.setAnimateDuration(0.3f);
    TextField textfield = new TextField("", skin);
    textfield.setMessageText("Click here!");
    textfield.setAlignment(Align.center);
    final SelectBox selectBox = new SelectBox(skin);
    selectBox.addListener(new ChangeListener() {

        public void changed(ChangeEvent event, Actor actor) {
            System.out.println(selectBox.getSelected());
        }
    });
    selectBox.setItems("Android1", "Windows1 long text in item", "Linux1", "OSX1", "Android2", "Windows2", "Linux2", "OSX2", "Android3", "Windows3", "Linux3", "OSX3", "Android4", "Windows4", "Linux4", "OSX4", "Android5", "Windows5", "Linux5", "OSX5", "Android6", "Windows6", "Linux6", "OSX6", "Android7", "Windows7", "Linux7", "OSX7");
    selectBox.setSelected("Linux6");
    Image imageActor = new Image(image2);
    ScrollPane scrollPane = new ScrollPane(imageActor);
    List list = new List(skin);
    list.setItems(listEntries);
    list.getSelection().setMultiple(true);
    list.getSelection().setRequired(false);
    // list.getSelection().setToggle(true);
    ScrollPane scrollPane2 = new ScrollPane(list, skin);
    scrollPane2.setFlickScroll(false);
    SplitPane splitPane = new SplitPane(scrollPane, scrollPane2, false, skin, "default-horizontal");
    fpsLabel = new Label("fps:", skin);
    // configures an example of a TextField in password mode.
    final Label passwordLabel = new Label("Textfield in password mode: ", skin);
    final TextField passwordTextField = new TextField("", skin);
    passwordTextField.setMessageText("password");
    passwordTextField.setPasswordCharacter('*');
    passwordTextField.setPasswordMode(true);
    buttonMulti.addListener(new TextTooltip("This is a tooltip! This is a tooltip! This is a tooltip! This is a tooltip! This is a tooltip! This is a tooltip!", skin));
    Table tooltipTable = new Table(skin);
    tooltipTable.pad(10).background("default-round");
    tooltipTable.add(new TextButton("Fancy tooltip!", skin));
    imgButton.addListener(new Tooltip(tooltipTable));
    // window.debug();
    Window window = new Window("Dialog", skin);
    window.getTitleTable().add(new TextButton("X", skin)).height(window.getPadTop());
    window.setPosition(0, 0);
    window.defaults().spaceBottom(10);
    window.row().fill().expandX();
    window.add(iconButton);
    window.add(buttonMulti);
    window.add(imgButton);
    window.add(imgToggleButton);
    window.row();
    window.add(checkBox);
    window.add(slider).minWidth(100).fillX().colspan(3);
    window.row();
    window.add(selectBox).maxWidth(100);
    window.add(textfield).minWidth(100).expandX().fillX().colspan(3);
    window.row();
    window.add(splitPane).fill().expand().colspan(4).maxHeight(200);
    window.row();
    window.add(passwordLabel).colspan(2);
    window.add(passwordTextField).minWidth(100).expandX().fillX().colspan(2);
    window.row();
    window.add(fpsLabel).colspan(4);
    window.pack();
    // stage.addActor(new Button("Behind Window", skin));
    stage.addActor(window);
    textfield.setTextFieldListener(new TextFieldListener() {

        public void keyTyped(TextField textField, char key) {
            if (key == '\n')
                textField.getOnscreenKeyboard().show(false);
        }
    });
    slider.addListener(new ChangeListener() {

        public void changed(ChangeEvent event, Actor actor) {
            Gdx.app.log("UITest", "slider: " + slider.getValue());
        }
    });
    iconButton.addListener(new ChangeListener() {

        public void changed(ChangeEvent event, Actor actor) {
            new Dialog("Some Dialog", skin, "dialog") {

                protected void result(Object object) {
                    System.out.println("Chosen: " + object);
                }
            }.text("Are you enjoying this demo?").button("Yes", true).button("No", false).key(Keys.ENTER, true).key(Keys.ESCAPE, false).show(stage);
        }
    });
    checkBox.addListener(new ChangeListener() {

        public void changed(ChangeEvent event, Actor actor) {
            Gdx.graphics.setContinuousRendering(checkBox.isChecked());
        }
    });
}
Also used : Slider(com.badlogic.gdx.scenes.scene2d.ui.Slider) Label(com.badlogic.gdx.scenes.scene2d.ui.Label) TextureRegionDrawable(com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable) SplitPane(com.badlogic.gdx.scenes.scene2d.ui.SplitPane) Image(com.badlogic.gdx.scenes.scene2d.ui.Image) Texture(com.badlogic.gdx.graphics.Texture) TextureRegion(com.badlogic.gdx.graphics.g2d.TextureRegion) ImageButton(com.badlogic.gdx.scenes.scene2d.ui.ImageButton) TextTooltip(com.badlogic.gdx.scenes.scene2d.ui.TextTooltip) TextButton(com.badlogic.gdx.scenes.scene2d.ui.TextButton) Button(com.badlogic.gdx.scenes.scene2d.ui.Button) ImageButton(com.badlogic.gdx.scenes.scene2d.ui.ImageButton) Dialog(com.badlogic.gdx.scenes.scene2d.ui.Dialog) Actor(com.badlogic.gdx.scenes.scene2d.Actor) Stage(com.badlogic.gdx.scenes.scene2d.Stage) TextField(com.badlogic.gdx.scenes.scene2d.ui.TextField) ImageButtonStyle(com.badlogic.gdx.scenes.scene2d.ui.ImageButton.ImageButtonStyle) ChangeListener(com.badlogic.gdx.scenes.scene2d.utils.ChangeListener) List(com.badlogic.gdx.scenes.scene2d.ui.List) TextFieldListener(com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener) ImageButtonStyle(com.badlogic.gdx.scenes.scene2d.ui.ImageButton.ImageButtonStyle) ButtonStyle(com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle) TextButton(com.badlogic.gdx.scenes.scene2d.ui.TextButton) Window(com.badlogic.gdx.scenes.scene2d.ui.Window) Table(com.badlogic.gdx.scenes.scene2d.ui.Table) SelectBox(com.badlogic.gdx.scenes.scene2d.ui.SelectBox) TextTooltip(com.badlogic.gdx.scenes.scene2d.ui.TextTooltip) Tooltip(com.badlogic.gdx.scenes.scene2d.ui.Tooltip) ScreenViewport(com.badlogic.gdx.utils.viewport.ScreenViewport) CheckBox(com.badlogic.gdx.scenes.scene2d.ui.CheckBox) ScrollPane(com.badlogic.gdx.scenes.scene2d.ui.ScrollPane) Skin(com.badlogic.gdx.scenes.scene2d.ui.Skin)

Example 5 with TextFieldListener

use of com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener in project ultimate-java by pantinor.

the class ConversationDialog method initialize.

private void initialize() {
    screen.gameTimer.active = false;
    setModal(true);
    defaults().space(10);
    add(internalTable = new Table(Ultima4.skin)).expand().fill();
    row();
    internalTable.defaults().pad(1);
    scrollPane = new LogScrollPane(Ultima4.skin, width);
    scrollPane.setHeight(height);
    input = new TextField("", Ultima4.skin);
    input.setTextFieldListener(new TextFieldListener() {

        @Override
        public void keyTyped(TextField tf, char key) {
            if (key == '\r') {
                if (tf.getText().length() == 0) {
                    if (!cancelHide) {
                        hide();
                    }
                    cancelHide = false;
                }
                Conversation conversation = person.getConversation();
                if (conversation != null) {
                    if (conversation instanceof CustomInputConversation) {
                        ((CustomInputConversation) conversation).setParty(screen.context.getParty());
                    }
                    String query = tf.getText();
                    Topic t = conversation.matchTopic(query);
                    if (t != null) {
                        if (t.getQuery() != null && t.getQuery().equals("join")) {
                            String name = conversation.getName();
                            Virtue virtue = screen.context.getParty().getVirtueForJoinable(name);
                            if (virtue != null) {
                                CannotJoinError join = screen.context.getParty().join(name);
                                if (join == CannotJoinError.JOIN_SUCCEEDED) {
                                    scrollPane.add("I am honored to join thee!");
                                    screen.context.getCurrentMap().removeJoinedPartyMemberFromPeopleList(screen.context.getParty());
                                } else {
                                    scrollPane.add("Thou art not " + (join == CannotJoinError.JOIN_NOT_VIRTUOUS ? virtue.getDescription() : "experienced") + " enough for me to join thee.");
                                }
                            } else {
                                scrollPane.add("I cannot join thee.");
                            }
                        } else {
                            if (!conversation.isStandardQuery(query)) {
                                screen.context.addEntry(conversation.getName(), conversation.getMap(), t.getPhrase());
                            }
                            scrollPane.add(t.getPhrase());
                            if (t.getQuestion() != null) {
                                scrollPane.add(t.getQuestion());
                            }
                        }
                        previousTopic = t;
                    } else {
                        if (previousTopic != null && previousTopic.getQuestion() != null) {
                            if (query.toLowerCase().contains("y")) {
                                screen.context.addEntry(conversation.getName(), conversation.getMap(), previousTopic.getYesResponse());
                                scrollPane.add(previousTopic.getYesResponse());
                                if (conversation.getRespAffectsHumility() > 0) {
                                    screen.context.getParty().adjustKarma(KarmaAction.BRAGGED);
                                }
                            } else {
                                screen.context.addEntry(conversation.getName(), conversation.getMap(), previousTopic.getNoResponse());
                                scrollPane.add(previousTopic.getNoResponse());
                                if (previousTopic.isLbHeal()) {
                                    for (PartyMember pm : screen.context.getParty().getMembers()) {
                                        pm.heal(HealType.CURE);
                                        pm.heal(HealType.FULLHEAL);
                                    }
                                    Sounds.play(Sound.HEALING);
                                }
                                if (conversation.getRespAffectsHumility() > 0) {
                                    screen.context.getParty().adjustKarma(KarmaAction.HUMBLE);
                                }
                            }
                        } else {
                            scrollPane.add("That I cannot help thee with.");
                        }
                        previousTopic = null;
                    }
                } else if (person.getRole() != null && vendor != null) {
                    String input = tf.getText();
                    vendor.setResponse(input);
                    vendor.nextDialog();
                }
                tf.setText("");
            }
        }
    });
    defaults().pad(5);
    internalTable.add(scrollPane).maxWidth(width).width(width);
    internalTable.row();
    internalTable.add(input).maxWidth(width).width(width);
    focusListener = new FocusListener() {

        @Override
        public void keyboardFocusChanged(FocusEvent event, Actor actor, boolean focused) {
            if (!focused) {
                focusChanged(event);
            }
        }

        @Override
        public void scrollFocusChanged(FocusEvent event, Actor actor, boolean focused) {
            if (!focused) {
                focusChanged(event);
            }
        }

        private void focusChanged(FocusEvent event) {
            Stage stage = getStage();
            if (isModal() && stage != null && stage.getRoot().getChildren().size > 0 && stage.getRoot().getChildren().peek() == ConversationDialog.this) {
                Actor newFocusedActor = event.getRelatedActor();
                if (newFocusedActor != null && !newFocusedActor.isDescendantOf(ConversationDialog.this) && !(newFocusedActor.equals(previousKeyboardFocus) || newFocusedActor.equals(previousScrollFocus))) {
                    event.cancel();
                }
            }
        }
    };
    person.setTalking(true);
    if (person.getConversation() != null) {
        if (person.getRole() != null && person.getRole().getRole().equals("lordbritish")) {
            LordBritishConversation conv = (LordBritishConversation) person.getConversation();
            scrollPane.add(conv.intro(screen.context));
            SequenceAction seq = Actions.action(SequenceAction.class);
            Party party = screen.context.getParty();
            if (party.getMember(0).getPlayer().status == StatusType.DEAD) {
                party.getMember(0).heal(HealType.RESURRECT);
                party.getMember(0).heal(HealType.FULLHEAL);
                seq.addAction(Actions.run(new LBAction(Sound.HEALING, "I resurrect thee.")));
                seq.addAction(Actions.delay(3f));
            }
            for (int i = 0; i < party.getMembers().size(); i++) {
                PartyMember pm = party.getMember(i);
                if (pm.getPlayer().advanceLevel()) {
                    seq.addAction(Actions.run(new LBAction(Sound.MAGIC, pm.getPlayer().name + " thou art now level " + pm.getPlayer().getLevel())));
                    seq.addAction(Actions.delay(3f));
                }
            }
            stage.addAction(seq);
        } else if (person.getRole() != null && person.getRole().getRole().equals("hawkwind")) {
            HawkwindConversation conv = (HawkwindConversation) person.getConversation();
            conv.setParty(screen.context.getParty());
            scrollPane.add(conv.intro());
        } else {
            scrollPane.add("You meet " + person.getConversation().getDescription().toLowerCase() + ".");
        }
    } else if (person.getRole() != null && person.getRole().getInventoryType() != null) {
        vendor = Ultima4.vendorClassSet.getVendorImpl(person.getRole().getInventoryType(), Maps.get(screen.context.getCurrentMap().getId()), screen.context);
        vendor.setScreen(screen);
        vendor.setScrollPane(scrollPane);
        vendor.nextDialog();
    }
}
Also used : Table(com.badlogic.gdx.scenes.scene2d.ui.Table) PartyMember(objects.Party.PartyMember) LordBritishConversation(objects.LordBritishConversation) LogScrollPane(util.LogScrollPane) Conversation(objects.Conversation) CustomInputConversation(objects.CustomInputConversation) LordBritishConversation(objects.LordBritishConversation) HawkwindConversation(objects.HawkwindConversation) HawkwindConversation(objects.HawkwindConversation) Party(objects.Party) Actor(com.badlogic.gdx.scenes.scene2d.Actor) TextField(com.badlogic.gdx.scenes.scene2d.ui.TextField) Stage(com.badlogic.gdx.scenes.scene2d.Stage) TextFieldListener(com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener) Topic(objects.Conversation.Topic) FocusListener(com.badlogic.gdx.scenes.scene2d.utils.FocusListener) SequenceAction(com.badlogic.gdx.scenes.scene2d.actions.SequenceAction) CustomInputConversation(objects.CustomInputConversation)

Aggregations

TextField (com.badlogic.gdx.scenes.scene2d.ui.TextField)5 TextFieldListener (com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener)5 Actor (com.badlogic.gdx.scenes.scene2d.Actor)4 Label (com.badlogic.gdx.scenes.scene2d.ui.Label)3 Table (com.badlogic.gdx.scenes.scene2d.ui.Table)3 ChangeListener (com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)3 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)2 InputListener (com.badlogic.gdx.scenes.scene2d.InputListener)2 Stage (com.badlogic.gdx.scenes.scene2d.Stage)2 Dialog (com.badlogic.gdx.scenes.scene2d.ui.Dialog)2 ScrollPane (com.badlogic.gdx.scenes.scene2d.ui.ScrollPane)2 SelectBox (com.badlogic.gdx.scenes.scene2d.ui.SelectBox)2 TextButton (com.badlogic.gdx.scenes.scene2d.ui.TextButton)2 FocusListener (com.badlogic.gdx.scenes.scene2d.utils.FocusListener)2 Sound (com.badlogic.gdx.audio.Sound)1 Texture (com.badlogic.gdx.graphics.Texture)1 TextureRegion (com.badlogic.gdx.graphics.g2d.TextureRegion)1 SequenceAction (com.badlogic.gdx.scenes.scene2d.actions.SequenceAction)1 Button (com.badlogic.gdx.scenes.scene2d.ui.Button)1 ButtonStyle (com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle)1