Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
403 B
0
Indexable
Never
    @FXML
    TextField chatTextField;
    @FXML
    Text opponentsText;
    @FXML
    AnchorPane chatPane;

    public void updateChat(){
        opponentsText.setText(Main.enemyChatText);

        String enemyTextString = opponentsText.toString();
        String[] lines = enemyTextString.split("\n");
        int lineCount = lines.length;

        chatPane.setPrefHeight(200 + lineCount * 15);

    }