Added things

This commit is contained in:
Michael-Jouanneau 2016-12-19 19:50:08 +01:00
parent 150b692faa
commit 7e184afa59
2 changed files with 22 additions and 15 deletions

5
.idea/misc.xml generated
View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectKey"> <component name="ProjectKey">
<option name="state" value="project://e79810c8-c5c8-43b1-b19c-90c1f4095425" /> <option name="state" value="project://e79810c8-c5c8-43b1-b19c-90c1f4095425" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
<component name="WebServicesPlugin" addRequiredLibraries="true" /> <component name="WebServicesPlugin" addRequiredLibraries="true" />

View File

@ -32,8 +32,10 @@ import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import javafx.scene.image.Image; import javafx.scene.image.Image;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.scene.shape.Rectangle; import javafx.scene.shape.Rectangle;
import javafx.stage.Modality;
import javafx.stage.Stage; import javafx.stage.Stage;
import javafx.stage.StageStyle; import javafx.stage.StageStyle;
import javafx.util.Duration; import javafx.util.Duration;
@ -171,7 +173,7 @@ public class Main extends Application {
} }
}); });
Settings_btn.setOnMouseClicked(event ->{ Settings_btn.setOnMouseClicked((MouseEvent event) ->{
if(!activeTab.equals(Settings_btn)){ if(!activeTab.equals(Settings_btn)){
updateTabSelection(Settings_btn, TabType.MAIN); updateTabSelection(Settings_btn, TabType.MAIN);
Node n = Tabs.switchTab("settings", tab), tmp; // Sets the active tab to the settings tab unless it's already active Node n = Tabs.switchTab("settings", tab), tmp; // Sets the active tab to the settings tab unless it's already active
@ -195,17 +197,25 @@ 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");
Stage login = new Stage(); try {
login.initStyle(StageStyle.UTILITY); Stage login = new Stage();
Pane minecraftlogin = (Pane) Tabs.load("instance_userinfo"); login.initModality(Modality.APPLICATION_MODAL);
login.setScene(new Scene(minecraftlogin, 300, 308)); login.initStyle(StageStyle.UTILITY);
login.show(); Pane minecraftlogin = (Pane) Tabs.load("instance_userinfo");
login.setResizable(false); login.setScene(new Scene(minecraftlogin, 300, 308));
login.setTitle("Minecraft Login"); login.show();
login.setResizable(false);
login.setTitle("Minecraft Login");
minecraftlogin.lookup("#minecraft-login").setOnMouseClicked(event4 ->{
System.out.println("Logging in ....");
});
}catch (Exception e) {
e.printStackTrace();
}
minecraftlogin.lookup("#minecraft-login").setOnMouseClicked(event4 ->{
System.out.println("Logging in ....");
});
}); });
} }