Changed Things

This commit is contained in:
Michael-Jouanneau 2016-11-16 18:46:54 +01:00
parent 0b386b6957
commit 3256e43c6c
2 changed files with 20 additions and 5 deletions

View File

@ -141,6 +141,12 @@ public class Main extends Application {
Tabs.switchTab("modpacks", tab);
if(stringUpdater!=null && stringUpdater.isAlive()) stringUpdater.cancel();
stringUpdater = new Async(SafeReflection.getFirstMethod(Main.class, "detectStringUpdate"), Tabs.load("modpacks").lookup("#search-modpacks"));
Tabs.load("modpacks").lookup("#download-modpack").setOnMouseClicked(event1 -> {
System.out.println("Downloading Modpack");
});
Tabs.load("modpacks").lookup("#view-modpack").setOnMouseClicked(event1 -> {
System.out.println("Viewing Modpack");
});
}
});
@ -181,9 +187,18 @@ public class Main extends Application {
Tabs.switchTab(settings_activeTab.getId().equals("Settings-Gen-btn") ? "settings_generic" : "settings_minecraft", (Pane) n.lookup("#Settings-Pane"));
if((tmp=Tabs.load("settings_generic").lookup("#default-theme")).getOnMouseClicked()==null) {
tmp.setOnMouseClicked(event2 -> Theme.Default.switchTo(root));
Tabs.load("settings_generic").lookup("#light-theme").setOnMouseClicked(event2 -> Theme.Light.switchTo(root));
Tabs.load("settings_generic").lookup("#dark-theme").setOnMouseClicked(event1 -> Theme.Dark.switchTo(root));
tmp.setOnMouseClicked(event2 -> {
Theme.Default.switchTo(root);
System.out.println("Changing Theme to Default");
});
Tabs.load("settings_generic").lookup("#light-theme").setOnMouseClicked(event2 -> {
Theme.Light.switchTo(root);
System.out.println("Changing Theme to Light");
});
Tabs.load("settings_generic").lookup("#dark-theme").setOnMouseClicked(event1 -> {
Theme.Dark.switchTo(root);
System.out.println("Changing Theme to Dark");
});
}
}
});

View File

@ -29,8 +29,8 @@
<Font name="Centaur" size="20.0" />
</font>
</Label>
<Button id="download-modpack" layoutX="644.0" layoutY="145.0" mnemonicParsing="false" prefHeight="37.0" prefWidth="47.0" text="View" />
<Button id="view-modpack" layoutX="553.0" layoutY="145.0" mnemonicParsing="false" prefHeight="37.0" prefWidth="77.0" text="Download" />
<Button id="view-modpack" layoutX="644.0" layoutY="145.0" mnemonicParsing="false" prefHeight="37.0" prefWidth="47.0" text="View" />
<Button id="download-modpack" layoutX="553.0" layoutY="145.0" mnemonicParsing="false" prefHeight="37.0" prefWidth="77.0" text="Download" />
<Label id="lable" layoutX="205.0" layoutY="86.0" prefHeight="25.0" prefWidth="480.0" text="Some random text. " wrapText="true" />
</children>
</Pane>