mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
- Created a Race Finish Dialog.
tags : #story[1245]
This commit is contained in:
@@ -76,17 +76,6 @@ public class GameClient {
|
||||
*/
|
||||
public GameClient(Pane holder) {
|
||||
this.holderPane = holder;
|
||||
// if (holderPane.getParent() == null) {
|
||||
// this.holderPane.parentProperty().addListener(((observable, oldValue, newValue) -> {
|
||||
// if (newValue != null) {
|
||||
// newValue.getScene().setOnKeyPressed(this::keyPressed);
|
||||
// newValue.getScene().setOnKeyReleased(this::keyReleased);
|
||||
// }
|
||||
// }));
|
||||
// } else {
|
||||
// this.holderPane.getParent().getScene().setOnKeyPressed(this::keyPressed);
|
||||
// this.holderPane.getParent().getScene().setOnKeyReleased(this::keyReleased);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,22 +106,10 @@ public class GameClient {
|
||||
ViewManager.getInstance().setProperty("serverName", regattaData.getRegattaName());
|
||||
ViewManager.getInstance().setProperty("mapName", regattaData.getCourseName());
|
||||
|
||||
// TODO disable ready button;
|
||||
|
||||
//LobbyController_old lobbyController = loadLobby();
|
||||
//lobbyController.setSocketThread(socketThread);
|
||||
//lobbyController.setPlayerID(socketThread.getClientId());
|
||||
//lobbyController.setPlayerListSource(clientLobbyList);
|
||||
//lobbyController.disableReadyButton();
|
||||
|
||||
|
||||
|
||||
// lobbyController.addCloseListener((exitCause) -> this.loadStartScreen());
|
||||
this.lobbyController = ViewManager.getInstance().goToLobby(true);
|
||||
|
||||
} catch (IOException ioe) {
|
||||
showConnectionError("Unable to find server");
|
||||
//Platform.runLater(this::loadStartScreen);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,6 +191,7 @@ public class GameClient {
|
||||
Sounds.stopMusic();
|
||||
Sounds.stopSoundEffects();
|
||||
Sounds.playFinishMusic();
|
||||
System.out.println("ITS WORKING HERE");
|
||||
FXMLLoader fxmlLoader = loadFXMLToHolder("/views/FinishScreenView.fxml");
|
||||
FinishScreenViewController controller = fxmlLoader.getController();
|
||||
controller.setFinishers(raceState.getPlayerPositions());
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package seng302.visualiser.controllers.dialogs;
|
||||
|
||||
|
||||
import com.jfoenix.controls.JFXButton;
|
||||
import com.jfoenix.controls.JFXListView;
|
||||
import java.awt.Label;
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import seng302.visualiser.controllers.ViewManager;
|
||||
|
||||
public class FinishDialogController implements Initializable {
|
||||
|
||||
//--------FXML BEGIN--------//
|
||||
@FXML
|
||||
private Label raceFinishLabel;
|
||||
@FXML
|
||||
private JFXListView finishersList;
|
||||
@FXML
|
||||
private JFXButton playAgain;
|
||||
//---------FXML END---------//
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
playAgain.setOnAction(event -> ViewManager.getInstance().goToStartView());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user