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