mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 02:15:34 -04:00
wip StartMenu (1)
This commit is contained in:
parent
2aaeae29b6
commit
cf70a76b04
5
pom.xml
5
pom.xml
@ -69,6 +69,11 @@
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>1.25</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-fxml</artifactId>
|
||||
<version>14.0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -14,10 +14,13 @@
|
||||
package de.bixilon.minosoft.render;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class StartMenu extends Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
@ -25,10 +28,16 @@ public class StartMenu extends Application {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) {
|
||||
Parent root = FXMLLoader.load(getClass().getResource("StartMenu.fxml"));
|
||||
primaryStage.setTitle("FXML");
|
||||
primaryStage.setScene(new Scene(root, 100, 57));
|
||||
primaryStage.show();
|
||||
public void start(Stage stage) throws IOException {
|
||||
VBox root = FXMLLoader.load(getClass().getResource("/layout/main/StartMenu.fxml"));
|
||||
Scene scene = new Scene(root);
|
||||
stage.setScene(scene);
|
||||
stage.setTitle("Minosoft DebugUI");
|
||||
|
||||
stage.show();
|
||||
// bring to front
|
||||
stage.setAlwaysOnTop(true);
|
||||
stage.setAlwaysOnTop(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
25
src/main/resources/layout/main/StartMenu.fxml
Normal file
25
src/main/resources/layout/main/StartMenu.fxml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Codename Minosoft
|
||||
~ Copyright (C) 2020 Lukas Eisenhauer
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
~
|
||||
~ This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
-->
|
||||
|
||||
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<AnchorPane xmlns:fx="http://javafx.com/fxml/1" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
|
||||
minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.2-internal">
|
||||
<children>
|
||||
<Button layoutX="154.0" layoutY="107.0" mnemonicParsing="false" prefHeight="93.0" prefWidth="127.0"
|
||||
text="PLAY"/>
|
||||
</children>
|
||||
</AnchorPane>
|
Loading…
x
Reference in New Issue
Block a user