mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
- Validation completely done
- Some documentation added. tags : #story[1245]
This commit is contained in:
@@ -23,16 +23,15 @@ import java.util.ResourceBundle;
|
||||
|
||||
public class StartScreenController implements Initializable{
|
||||
|
||||
//--------FXML BEGIN--------//
|
||||
@FXML
|
||||
private Label headText;
|
||||
|
||||
@FXML
|
||||
private JFXButton startBtn;
|
||||
//---------FXML END---------//
|
||||
|
||||
private Node serverList;
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(StartScreenController.class);
|
||||
|
||||
private List<ServerDescription> servers;
|
||||
private GameClient gameClient;
|
||||
// public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||
@@ -53,6 +52,17 @@ public class StartScreenController implements Initializable{
|
||||
//// gameClient = new GameClient(holder);
|
||||
// }
|
||||
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
startBtn.setOnMousePressed(event -> startBtn.setText("LOADING..."));
|
||||
startBtn.setOnMouseReleased(event -> goToServerBrowser());
|
||||
|
||||
setInitialDropShadow();
|
||||
preloadServerListView();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void setInitialDropShadow() {
|
||||
DropShadow dropShadow = new DropShadow();
|
||||
dropShadow.setRadius(10.0);
|
||||
@@ -62,6 +72,9 @@ public class StartScreenController implements Initializable{
|
||||
headText.setEffect(dropShadow);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void preloadServerListView(){
|
||||
try {
|
||||
serverList = FXMLLoader
|
||||
@@ -72,6 +85,9 @@ public class StartScreenController implements Initializable{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void goToServerBrowser() {
|
||||
try {
|
||||
ViewManager.getInstance().setScene(serverList);
|
||||
@@ -80,16 +96,6 @@ public class StartScreenController implements Initializable{
|
||||
}
|
||||
}
|
||||
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
startBtn.setOnMousePressed(event -> startBtn.setText("LOADING..."));
|
||||
startBtn.setOnMouseReleased(event -> goToServerBrowser());
|
||||
|
||||
setInitialDropShadow();
|
||||
preloadServerListView();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void toggleMusic(ActionEvent actionEvent) {
|
||||
Sounds.toggleMuteMusic();
|
||||
Sounds.playButtonClick();
|
||||
|
||||
Reference in New Issue
Block a user