Responsive
This commit is contained in:
parent
a2bc3f1dd4
commit
ff4f0aaab1
@ -1,5 +1,7 @@
|
||||
package ihm;
|
||||
|
||||
import java.awt.GraphicsDevice;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.net.URL;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
@ -14,6 +16,10 @@ import javafx.stage.WindowEvent;
|
||||
import main.GestionnaireJeu;
|
||||
|
||||
public class Main extends Application {
|
||||
GraphicsDevice Gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
|
||||
int width = Gd.getDisplayMode().getWidth();
|
||||
int height = Gd.getDisplayMode().getHeight();
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
final URL fxmlURL = getClass().getResource("ressources/Menu.fxml");
|
||||
@ -22,7 +28,8 @@ public class Main extends Application {
|
||||
Pane root = fxmlLoader.load();
|
||||
|
||||
primaryStage.setTitle("Shadow Hunters");
|
||||
primaryStage.setScene(new Scene(root));
|
||||
primaryStage.setScene(new Scene(root,width,height));
|
||||
primaryStage.setMaximized(true);
|
||||
primaryStage.centerOnScreen();
|
||||
primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
|
||||
@Override
|
||||
|
@ -107,12 +107,13 @@ public class ParametreController implements Initializable {
|
||||
|
||||
// Pour la couleur du theme
|
||||
|
||||
/*
|
||||
|
||||
if (clair.isSelected()) {
|
||||
//Pane root = FXMLLoader.load(getClass().getResource("../ressources/parametre.fxml"));
|
||||
//root.setStyle("ressources/style/menuLight.css");
|
||||
//Pane root = FXMLLoader.load(getClass().getResource("../ressources/menu.fxml"));
|
||||
//rootPane.setStyle("-fx-background-color: white;");
|
||||
}
|
||||
|
||||
if (liste != null) {
|
||||
/*if (liste != null) {
|
||||
for (int i = 0; i < liste.length; i++) {
|
||||
|
||||
System.out.println(liste[i]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user