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());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
* {
|
||||
-fx-text-fill: -fx-pp-dark-text-color;
|
||||
}
|
||||
|
||||
#submitBtn {
|
||||
-fx-background-color: -fx-pp-theme-color;
|
||||
@@ -23,7 +20,15 @@
|
||||
-fx-font-size: 18px;
|
||||
}
|
||||
|
||||
#boatName, #boatColorLabel, #hostDialogHeader {
|
||||
-fx-text-fill: -fx-pp-dark-text-color;
|
||||
}
|
||||
|
||||
#boatName {
|
||||
-fx-font-size: 18px;
|
||||
-fx-prompt-text-fill: -fx-pp-dark-text-color;
|
||||
}
|
||||
|
||||
#boatName .error-label {
|
||||
-fx-font-size: 13px;
|
||||
}
|
||||
@@ -22,8 +22,10 @@
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="90.0" minHeight="90.0" prefHeight="90.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="100.0" minHeight="100.0" prefHeight="100.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="125.0" minHeight="61.0" prefHeight="61.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="164.0" minHeight="100.0" prefHeight="164.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="125.0" minHeight="61.0" prefHeight="99.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
<RowConstraints maxHeight="164.0" minHeight="100.0" prefHeight="126.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label fx:id="hostDialogHeader" text="Customize Boat" GridPane.halignment="CENTER"
|
||||
@@ -34,22 +36,26 @@
|
||||
<GridPane.margin>
|
||||
<Insets left="30.0" right="30.0" />
|
||||
</GridPane.margin></JFXTextField>
|
||||
<GridPane GridPane.rowIndex="2">
|
||||
<GridPane GridPane.halignment="CENTER" GridPane.rowIndex="2"
|
||||
GridPane.valignment="CENTER">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="139.0" minWidth="10.0" prefWidth="89.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="203.0" minWidth="10.0" prefWidth="203.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="139.0" minWidth="10.0"
|
||||
prefWidth="94.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="203.0" minWidth="10.0"
|
||||
prefWidth="198.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="69.0" minHeight="10.0" percentHeight="60.0" prefHeight="19.6" vgrow="SOMETIMES" />
|
||||
<RowConstraints percentHeight="100.0" valignment="CENTER" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label fx:id="boatColorLabel" prefHeight="25.0" prefWidth="96.0"
|
||||
text="Boat Color">
|
||||
text="Boat Color" GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets top="-10.0" />
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<JFXColorPicker fx:id="colorPicker" onAction="#colorChanged" GridPane.columnIndex="1">
|
||||
<JFXColorPicker fx:id="colorPicker" onAction="#colorChanged"
|
||||
GridPane.columnIndex="1" GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets left="30.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
|
||||
Reference in New Issue
Block a user