mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed chat history text line spacing to a smaller amount.
tags: #story[1245]
This commit is contained in:
@@ -53,7 +53,7 @@ public class ChatHistory extends ScrollPane {
|
|||||||
public void addMessage (Paint colour, String Text) {
|
public void addMessage (Paint colour, String Text) {
|
||||||
String[] words = Text.split(":");
|
String[] words = Text.split(":");
|
||||||
if (words[0].trim().equals("SERVER")) {
|
if (words[0].trim().equals("SERVER")) {
|
||||||
Text text = new Text(Text + "\n\n");
|
Text text = new Text(Text + "\n");
|
||||||
text.setStyle("-fx-font-weight: bolder");
|
text.setStyle("-fx-font-weight: bolder");
|
||||||
textFlow.getChildren().add(text);
|
textFlow.getChildren().add(text);
|
||||||
} else {
|
} else {
|
||||||
@@ -63,7 +63,7 @@ public class ChatHistory extends ScrollPane {
|
|||||||
timePlayer.setStyle("-fx-font-weight: bold");
|
timePlayer.setStyle("-fx-font-weight: bold");
|
||||||
timePlayer.setFill(colour);
|
timePlayer.setFill(colour);
|
||||||
Text message = new Text(
|
Text message = new Text(
|
||||||
String.join(":", Arrays.copyOfRange(words, 3, words.length)) + "\n\n"
|
String.join(":", Arrays.copyOfRange(words, 3, words.length)) + "\n"
|
||||||
);
|
);
|
||||||
message.wrappingWidthProperty().bind(this.widthProperty());
|
message.wrappingWidthProperty().bind(this.widthProperty());
|
||||||
textFlow.getChildren().addAll(timePlayer, message);
|
textFlow.getChildren().addAll(timePlayer, message);
|
||||||
|
|||||||
Reference in New Issue
Block a user