mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
implemented basic single client proof of concept for the chat history #story[1246]
This commit is contained in:
@@ -25,6 +25,8 @@ import javafx.scene.control.Button;
|
||||
import javafx.scene.control.CheckBox;
|
||||
import javafx.scene.control.ComboBox;
|
||||
import javafx.scene.control.Slider;
|
||||
import javafx.scene.control.TextArea;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.scene.layout.VBox;
|
||||
@@ -53,6 +55,12 @@ import seng302.visualiser.fxObjects.BoatObject;
|
||||
*/
|
||||
public class RaceViewController extends Thread implements ImportantAnnotationDelegate {
|
||||
|
||||
@FXML
|
||||
private Button chatSend;
|
||||
@FXML
|
||||
private TextArea chatHistory;
|
||||
@FXML
|
||||
private TextField chatInput;
|
||||
@FXML
|
||||
private LineChart<String, Double> raceSparkLine;
|
||||
@FXML
|
||||
@@ -622,4 +630,9 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
||||
this.courseData = raceData;
|
||||
gameView.updateBorder(raceData.getCourseLimit());
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void onSendAction() {
|
||||
chatHistory.setText(chatHistory.getText() + chatInput.getText() + '\n');
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,31 @@
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<AnchorPane fx:id="contentAnchorPane" prefHeight="200.0" prefWidth="200.0"
|
||||
GridPane.columnSpan="2" GridPane.rowSpan="2"/>
|
||||
GridPane.columnSpan="2" GridPane.rowSpan="2">
|
||||
<children>
|
||||
<AnchorPane layoutX="799.0" layoutY="770.0" prefHeight="214.0"
|
||||
prefWidth="468.0">
|
||||
<children>
|
||||
<VBox prefHeight="214.0" prefWidth="468.0"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<TextArea fx:id="chatHistory" VBox.vgrow="ALWAYS"/>
|
||||
<HBox VBox.vgrow="NEVER">
|
||||
<children>
|
||||
<TextField fx:id="chatInput"
|
||||
prefHeight="25.0" HBox.hgrow="ALWAYS"/>
|
||||
<Button fx:id="chatSend"
|
||||
mnemonicParsing="false"
|
||||
onAction="#onSendAction" text="Send"/>
|
||||
</children>
|
||||
</HBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<Text fx:id="fpsDisplay" strokeType="OUTSIDE" strokeWidth="0.0" text="60 FPS"
|
||||
GridPane.halignment="CENTER" GridPane.valignment="CENTER"/>
|
||||
</children>
|
||||
|
||||
Reference in New Issue
Block a user