Untitled

Anonymous
plain_text
07/17/2023 5:16 PM
540 B
12
Indexable
    @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);

    }
Editor is loading...