mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
- Fixed bug in customize dialog.
tags : #story[1245]
This commit is contained in:
@@ -110,7 +110,6 @@ public class LobbyController implements Initializable {
|
||||
}
|
||||
|
||||
private JFXDialog createCustomizeDialog() {
|
||||
// TODO: 12/09/17 ajm412: Why is this here? is there no better way we can do this? Ideally inside the LobbyController.
|
||||
FXMLLoader dialog = new FXMLLoader(
|
||||
getClass().getResource("/views/dialogs/BoatCustomizeDialog.fxml"));
|
||||
|
||||
@@ -119,7 +118,6 @@ public class LobbyController implements Initializable {
|
||||
try {
|
||||
customizationDialog = new JFXDialog(serverListMainStackPane, dialog.load(),
|
||||
JFXDialog.DialogTransition.CENTER);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -128,6 +126,9 @@ public class LobbyController implements Initializable {
|
||||
|
||||
controller.setParentController(this);
|
||||
controller.setPlayerColor(this.playersColor);
|
||||
controller.setPlayerName(this.playerBoats
|
||||
.get(ViewManager.getInstance().getGameClient().getServerThread().getClientId())
|
||||
.getBoatName());
|
||||
|
||||
return customizationDialog;
|
||||
}
|
||||
|
||||
@@ -38,10 +38,6 @@ public class BoatCustomizeController implements Initializable{
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
submitBtn.setOnMouseReleased(event -> {
|
||||
Sounds.playButtonClick();
|
||||
submitCustomization();
|
||||
});
|
||||
|
||||
socketThread = ViewManager.getInstance().getGameClient().getServerThread();
|
||||
|
||||
@@ -53,6 +49,11 @@ public class BoatCustomizeController implements Initializable{
|
||||
|
||||
boatName.setValidators(playerNameLengthValidator, playerNameReqValidator);
|
||||
|
||||
submitBtn.setOnMouseReleased(event -> {
|
||||
Sounds.playButtonClick();
|
||||
submitCustomization();
|
||||
});
|
||||
|
||||
submitBtn.setOnMouseEntered(e -> Sounds.playHoverSound());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user