Some design tweaks mainly of the chat
This commit is contained in:
parent
b67dbd684b
commit
1b2d4b3e16
@ -15,6 +15,7 @@ import javafx.beans.value.ObservableValue;
|
|||||||
import javafx.collections.ListChangeListener;
|
import javafx.collections.ListChangeListener;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.Group;
|
import javafx.scene.Group;
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
@ -185,9 +186,13 @@ public class ChatController implements Initializable {
|
|||||||
l.setWrapText(true);
|
l.setWrapText(true);
|
||||||
l.setMaxHeight(Double.MAX_VALUE);
|
l.setMaxHeight(Double.MAX_VALUE);
|
||||||
if (msg.contains("whispers")) {
|
if (msg.contains("whispers")) {
|
||||||
l.setBackground(Background.fill(Color.SLATEBLUE));
|
l.setBackground(Background.fill(Color.TRANSPARENT));
|
||||||
|
l.setPrefWidth(1135);
|
||||||
|
l.setScaleShape(false);
|
||||||
} else {
|
} else {
|
||||||
l.setBackground(Background.fill(Color.LIGHTSKYBLUE));
|
l.setBackground(Background.fill(Color.TRANSPARENT));
|
||||||
|
l.setPrefWidth(1135);
|
||||||
|
l.setScaleShape(false);
|
||||||
}
|
}
|
||||||
l.setTextFill(Color.BLACK);
|
l.setTextFill(Color.BLACK);
|
||||||
Platform.runLater(new Runnable() {
|
Platform.runLater(new Runnable() {
|
||||||
|
|||||||
@ -24,15 +24,20 @@ public class ChatLabelConfigurator {
|
|||||||
if (cmd.startsWith(whisper)) {
|
if (cmd.startsWith(whisper)) {
|
||||||
//t = new Text("You whispered to " + whisperTargetSelectField.getText() + ": " + msg);
|
//t = new Text("You whispered to " + whisperTargetSelectField.getText() + ": " + msg);
|
||||||
l = new Label("You whispered to " + whisperTargetSelectField.getText() + ": " + msg);
|
l = new Label("You whispered to " + whisperTargetSelectField.getText() + ": " + msg);
|
||||||
l.setBackground(Background.fill(Color.LAVENDERBLUSH));
|
l.setBackground(Background.fill(Color.TRANSPARENT));
|
||||||
} else {
|
|
||||||
//t = new Text(client.getUsername() + " (you): " + msg);
|
|
||||||
l = new Label(client.getUsername() + " (you): " + msg);
|
|
||||||
l.setBackground(Background.fill(Color.LAVENDER));
|
|
||||||
l.setAlignment(Pos.CENTER_RIGHT);
|
l.setAlignment(Pos.CENTER_RIGHT);
|
||||||
l.setWrapText(true);
|
l.setWrapText(true);
|
||||||
l.setMaxHeight(Double.MAX_VALUE);
|
l.setMaxHeight(Double.MAX_VALUE);
|
||||||
l.setPrefWidth(1150);
|
l.setPrefWidth(1135);
|
||||||
|
l.setScaleShape(false);
|
||||||
|
} else {
|
||||||
|
//t = new Text(client.getUsername() + " (you): " + msg);
|
||||||
|
l = new Label(client.getUsername() + " (you): " + msg);
|
||||||
|
l.setBackground(Background.fill(Color.TRANSPARENT));
|
||||||
|
l.setAlignment(Pos.CENTER_RIGHT);
|
||||||
|
l.setWrapText(true);
|
||||||
|
l.setMaxHeight(Double.MAX_VALUE);
|
||||||
|
l.setPrefWidth(1135);
|
||||||
l.setScaleShape(false);
|
l.setScaleShape(false);
|
||||||
}
|
}
|
||||||
return l;
|
return l;
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
#ChatScrollPane{
|
|
||||||
|
.scroll-pane{
|
||||||
|
-fx-background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#vBoxChatMessages{
|
#vBoxChatMessages{
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<Image url="@images/chatwindow.png" />
|
<Image url="@images/chatwindow.png" />
|
||||||
</image>
|
</image>
|
||||||
</ImageView>
|
</ImageView>
|
||||||
<AnchorPane layoutX="105.0" layoutY="100.0" prefHeight="215.0" prefWidth="1150.0">
|
<AnchorPane layoutX="115.0" layoutY="95.0" prefHeight="220.0" prefWidth="1128.0">
|
||||||
<children>
|
<children>
|
||||||
<GridPane alignment="CENTER" maxWidth="-Infinity" pickOnBounds="false" prefWidth="1300.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
<GridPane alignment="CENTER" maxWidth="-Infinity" pickOnBounds="false" prefWidth="1300.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
@ -32,9 +32,9 @@
|
|||||||
<RowConstraints maxHeight="-Infinity" minHeight="10.0" percentHeight="30.0" valignment="CENTER" vgrow="ALWAYS" />
|
<RowConstraints maxHeight="-Infinity" minHeight="10.0" percentHeight="30.0" valignment="CENTER" vgrow="ALWAYS" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<ScrollPane fx:id="ChatScrollPane" fitToHeight="true" fitToWidth="true" hbarPolicy="ALWAYS" maxHeight="1.7976931348623157E308" maxWidth="-Infinity" prefHeight="151.0" prefWidth="1150.0" vbarPolicy="ALWAYS">
|
<ScrollPane fx:id="ChatScrollPane" fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" maxHeight="1.7976931348623157E308" maxWidth="-Infinity">
|
||||||
<content>
|
<content>
|
||||||
<VBox fx:id="vBoxChatMessages" maxWidth="-Infinity" minWidth="-Infinity" prefWidth="1300.0" spacing="2.0" />
|
<VBox fx:id="vBoxChatMessages" maxWidth="-Infinity" minWidth="-Infinity" prefWidth="1128.0" spacing="2.0" />
|
||||||
</content>
|
</content>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
<AnchorPane maxHeight="1.7976931348623157E308" maxWidth="-Infinity" pickOnBounds="false" prefWidth="1300.0" GridPane.rowIndex="1">
|
<AnchorPane maxHeight="1.7976931348623157E308" maxWidth="-Infinity" pickOnBounds="false" prefWidth="1300.0" GridPane.rowIndex="1">
|
||||||
|
|||||||
@ -7,11 +7,21 @@
|
|||||||
-fx-border-color: transparent;
|
-fx-border-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button:pressed{
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
-fx-border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
#noiseButton{
|
#noiseButton{
|
||||||
-fx-background-color: midnightblue;
|
-fx-background-color: midnightblue;
|
||||||
-fx-text-fill: lightgrey;
|
-fx-text-fill: lightgrey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#noiseButton:pressed{
|
||||||
|
-fx-background-color: midnightblue;
|
||||||
|
-fx-text-fill: lightgrey;
|
||||||
|
}
|
||||||
|
|
||||||
#roomButtonGroup{
|
#roomButtonGroup{
|
||||||
-fx-background-color: transparent;
|
-fx-background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,3 +21,7 @@
|
|||||||
.button:hover{
|
.button:hover{
|
||||||
-fx-effect: innershadow(gaussian, lightsteelblue, 10, 0.5 , 2, 2);
|
-fx-effect: innershadow(gaussian, lightsteelblue, 10, 0.5 , 2, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*{
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user