-
Notifications
You must be signed in to change notification settings - Fork 0
/
PauseScreen.java
34 lines (28 loc) · 1.05 KB
/
PauseScreen.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package sample;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.control.Button;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import java.io.IOException;
public class PauseScreen
{
@FXML private Button HomeButtonPauseScreen;
@FXML private Button ResumePauseScreen;
@FXML private ImageView ImageViewPauseScreen;
@FXML private AnchorPane AnchorPanePauseScreen;
public void HomeButton(MouseEvent event) throws IOException
{
System.out.println("Home Button on pause screen clicked");
Parent root= FXMLLoader.load(getClass().getResource("sample.fxml"));
AnchorPanePauseScreen.getChildren().setAll(root);
}
public void ResumeButton(MouseEvent event) throws IOException
{
System.out.println("Resume Button on pause screen clicked");
Parent root=FXMLLoader.load(getClass().getResource("GameplayPage.fxml"));
AnchorPanePauseScreen.getChildren().setAll(root);
}
}