Added things

This commit is contained in:
Michael-Jouanneau 2016-12-20 19:02:39 +01:00
parent 41868c23aa
commit 1cd68ab2f0
2 changed files with 16 additions and 15 deletions

View File

@ -88,6 +88,7 @@ public class Main extends Application {
d.initStyle(StageStyle.UNDECORATED); d.initStyle(StageStyle.UNDECORATED);
Pane n = (Pane) Tabs.load("dialog_update"); Pane n = (Pane) Tabs.load("dialog_update");
d.setScene(new Scene(n)); d.setScene(new Scene(n));
d.getIcons().add(appIcon = new Image(getClass().getResourceAsStream("/assets/icons/app.png")));
d.show(); d.show();
Thread t1 = new Thread(()->{ Thread t1 = new Thread(()->{
try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); }
@ -191,23 +192,22 @@ public class Main extends Application {
Tabs.load("settings_minecraft").lookup("#minecraft-login-btn").setOnMouseClicked(event3 ->{ Tabs.load("settings_minecraft").lookup("#minecraft-login-btn").setOnMouseClicked(event3 ->{
System.out.println("Logging into minecraft"); System.out.println("Logging into minecraft");
try { Stage login = new Stage();
Stage login = new Stage(); login.initModality(Modality.APPLICATION_MODAL);
login.initModality(Modality.APPLICATION_MODAL); login.initStyle(StageStyle.UNDECORATED);
login.initStyle(StageStyle.UTILITY); Pane minecraftlogin = (Pane) Tabs.load("instance_userinfo");
Pane minecraftlogin = (Pane) Tabs.load("instance_userinfo"); login.setScene(new Scene(minecraftlogin, 300, 308));
login.setScene(new Scene(minecraftlogin, 300, 308)); login.show();
login.show(); login.setResizable(false);
login.setResizable(false); login.setTitle("Minecraft Login");
login.setTitle("Minecraft Login");
minecraftlogin.lookup("#minecraft-login").setOnMouseClicked(event4 ->{ minecraftlogin.lookup("#close-minecraft-login-window").setOnMouseClicked(event4 ->{
System.out.println("Logging in ...."); login.close();
}); });
}catch (Exception e) { minecraftlogin.lookup("#minecraft-login").setOnMouseClicked(event4 ->{
e.printStackTrace(); System.out.println("Logging in ....");
} });
}); });
} }
}); });

View File

@ -31,5 +31,6 @@
<Image url="@../icons/minecraft.png" /> <Image url="@../icons/minecraft.png" />
</image> </image>
</ImageView> </ImageView>
<Button id="close-minecraft-login-window" layoutX="250.0" layoutY="5.0" mnemonicParsing="false" prefHeight="19.0" prefWidth="45.0" text="Close" />
</children> </children>
</Pane> </Pane>