質問編集履歴
1
表示しているソースコードを変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -43,77 +43,53 @@
|
|
43
43
|
```
|
44
44
|
|
45
45
|
### 該当のソースコード
|
46
|
-
Main.java
|
47
|
-
```
|
46
|
+
```FXML
|
48
|
-
|
47
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
49
48
|
|
49
|
+
<?package io.github.XXXX.XXXX?>
|
50
|
-
import
|
50
|
+
<?import javafx.geometry.Point3D?>
|
51
|
-
import java.net.URL;
|
52
|
-
import
|
51
|
+
<?import javafx.scene.control.Label?>
|
52
|
+
<?import javafx.scene.control.ScrollPane?>
|
53
|
+
<?import javafx.scene.image.Image?>
|
54
|
+
<?import javafx.scene.image.ImageView?>
|
55
|
+
<?import javafx.scene.layout.BorderPane?>
|
56
|
+
<?import javafx.scene.layout.HBox?>
|
57
|
+
<?import javafx.scene.layout.Pane?>
|
58
|
+
<?import javafx.scene.layout.StackPane?>
|
59
|
+
<?import javafx.scene.layout.VBox?>
|
60
|
+
<?import javafx.scene.text.Font?>
|
53
61
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
+
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="540.0" prefWidth="960.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.github.XXXX.XXXX.LauncherController">
|
63
|
+
<children>
|
64
|
+
<ImageView fitHeight="540.0" fitWidth="960.0" pickOnBounds="true" preserveRatio="true">
|
65
|
+
<image>
|
66
|
+
<Image url="@../../../../Data/Image/GCC.png" />
|
67
|
+
</image>
|
68
|
+
</ImageView>
|
69
|
+
<Pane prefHeight="540.0" prefWidth="960.0">
|
70
|
+
<children>
|
71
|
+
<HBox prefHeight="34.0" prefWidth="200.0">
|
72
|
+
省略
|
73
|
+
</HBox>
|
74
|
+
<StackPane layoutX="400.0" layoutY="402.0" prefHeight="110.0" prefWidth="509.0">
|
75
|
+
省略
|
76
|
+
</StackPane>
|
77
|
+
<ImageView fx:id="snImage" layoutX="597.0" layoutY="120.0" pickOnBounds="true" preserveRatio="true" />
|
78
|
+
<StackPane layoutX="53.0" layoutY="61.0" prefHeight="451.0" prefWidth="301.0">
|
79
|
+
<children>
|
80
|
+
<VBox prefHeight="200.0" prefWidth="100.0">
|
81
|
+
省略
|
82
|
+
</VBox>
|
83
|
+
</children>
|
84
|
+
</StackPane>
|
85
|
+
</children>
|
86
|
+
</Pane>
|
87
|
+
</children>
|
88
|
+
</Pane>
|
89
|
+
```
|
62
90
|
|
63
91
|
|
64
|
-
public class Main extends Application {
|
65
|
-
public static String hostName;
|
66
|
-
public static String hostAddress;
|
67
|
-
public static Server server;
|
68
|
-
public static Launch nowGame;
|
69
|
-
|
70
|
-
public static Stage stage;
|
71
|
-
public static void main(String[] args) {
|
72
|
-
System.out.println(System.getProperty("user.dir"));
|
73
|
-
Launch.gameLoad();
|
74
|
-
nowGame = new Launch(1,0);
|
75
|
-
System.out.println(nowGame.nameLoad());
|
76
|
-
System.out.println("起動しました");
|
77
|
-
try {
|
78
|
-
InetAddress ip = InetAddress.getLocalHost();
|
79
|
-
System.out.println("ipアドレス:" + ip.getHostAddress());hostAddress = ip.getHostAddress();
|
80
|
-
System.out.println("コンピュータ名:" + ip.getHostName());hostName = ip.getHostAddress();
|
81
|
-
|
82
|
-
} catch (UnknownHostException e) {
|
83
|
-
// TODO 自動生成された catch ブロック
|
84
|
-
e.printStackTrace();
|
85
|
-
}
|
86
|
-
server = new Server("localhost",32369);
|
87
|
-
Thread th = new Thread(server);
|
88
|
-
th.start();
|
89
|
-
System.out.println("並列処理が開始されました");
|
90
|
-
launch(args);
|
91
|
-
}
|
92
|
-
|
93
|
-
@Override
|
94
|
-
public void start(Stage primaryStage) {
|
95
|
-
try {
|
96
|
-
Pane root = (Pane)FXMLLoader.load(new URL("file:/C:/Users/pizza king/Desktop/2019GCC/src/io/github/kogyokusha_gcc/gcc2019/Launcher.fxml"));
|
97
|
-
Scene scene = new Scene(root);
|
98
|
-
primaryStage.setResizable(false);
|
99
|
-
primaryStage.sizeToScene();
|
100
|
-
primaryStage.setTitle("デバッグモード");
|
101
|
-
//scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
|
102
|
-
primaryStage.setScene(scene);
|
103
|
-
primaryStage.show();
|
104
|
-
stage = primaryStage;
|
105
|
-
//scene.setOnKeyPressed(new GameChooseHandler());
|
106
|
-
} catch(Exception e) {
|
107
|
-
e.printStackTrace();
|
108
|
-
}
|
109
|
-
primaryStage.setOnCloseRequest((javafx.stage.WindowEvent event) -> {
|
110
|
-
System.out.println("終了処理を開始します。");
|
111
|
-
//resize.cancel();
|
112
|
-
System.exit(0);
|
113
|
-
});
|
114
|
-
}
|
115
|
-
```
|
116
|
-
|
92
|
+
Main.java、LauncherController.java、他のクラスは文字数の関係で、省略させていただきました。ほしい情報等がありましたら、教えてください。
|
117
93
|
### 補足情報(FW/ツールのバージョンなど)
|
118
94
|
Java10
|
119
95
|
EclipsePhoton
|