commit
4808514cac
@ -54,7 +54,7 @@ public class Main extends Application {
|
|||||||
public static final String semVerDevState = "PreDev"; // Development stage
|
public static final String semVerDevState = "PreDev"; // Development stage
|
||||||
public static final int semVerMajor = 0; // Major version
|
public static final int semVerMajor = 0; // Major version
|
||||||
public static final int semVerMinor = 2; // Minor version
|
public static final int semVerMinor = 2; // Minor version
|
||||||
public static final int semVerPatch = 4; // Patch version
|
public static final int semVerPatch = 5; // Patch version
|
||||||
|
|
||||||
|
|
||||||
double xOffset = 0, yOffset = 0; // Offsets for dragging
|
double xOffset = 0, yOffset = 0; // Offsets for dragging
|
||||||
|
@ -5,8 +5,16 @@ import javafx.fxml.FXMLLoader;
|
|||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.layout.Pane;
|
import javafx.scene.layout.Pane;
|
||||||
import javafx.util.Pair;
|
import javafx.util.Pair;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Enumeration;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.jar.JarEntry;
|
||||||
|
import java.util.jar.JarFile;
|
||||||
|
|
||||||
@SuppressWarnings({"unused", "WeakerAccess"})
|
@SuppressWarnings({"unused", "WeakerAccess"})
|
||||||
public class Tabs {
|
public class Tabs {
|
||||||
@ -71,4 +79,29 @@ public class Tabs {
|
|||||||
unloadTab(fileName);
|
unloadTab(fileName);
|
||||||
return load(fileName);
|
return load(fileName);
|
||||||
}
|
}
|
||||||
|
public static List<String> listShit(Class from, String path) throws IOException{
|
||||||
|
final File jarFile = new File(from.getProtectionDomain().getCodeSource().getLocation().getPath());
|
||||||
|
List<String> l = new ArrayList<>();
|
||||||
|
if(jarFile.isFile()) { // Run with JAR file
|
||||||
|
final JarFile jar = new JarFile(jarFile);
|
||||||
|
final Enumeration<JarEntry> entries = jar.entries(); //gives ALL entries in jar
|
||||||
|
while(entries.hasMoreElements()) {
|
||||||
|
final String name = entries.nextElement().getName();
|
||||||
|
if (name.startsWith(path + "/")) //filter according to the path
|
||||||
|
l.add(name);
|
||||||
|
}
|
||||||
|
jar.close();
|
||||||
|
} else { // Run with IDE
|
||||||
|
final URL url = from.getResource("/" + path);
|
||||||
|
if (url != null)
|
||||||
|
try {
|
||||||
|
final File apps = new File(url.toURI());
|
||||||
|
for (File app : apps.listFiles())
|
||||||
|
l.add(app.getName());
|
||||||
|
} catch (URISyntaxException ex) {
|
||||||
|
// never happens
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return l;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<?import javafx.scene.Cursor?>
|
<?import javafx.scene.Cursor?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.ProgressIndicator?>
|
<?import javafx.scene.control.ProgressIndicator?>
|
||||||
|
<?import javafx.scene.effect.ColorAdjust?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
@ -25,5 +26,8 @@
|
|||||||
<ProgressIndicator layoutX="331.0" layoutY="28.0" mouseTransparent="true" nodeOrientation="LEFT_TO_RIGHT">
|
<ProgressIndicator layoutX="331.0" layoutY="28.0" mouseTransparent="true" nodeOrientation="LEFT_TO_RIGHT">
|
||||||
<cursor>
|
<cursor>
|
||||||
<Cursor fx:constant="WAIT" />
|
<Cursor fx:constant="WAIT" />
|
||||||
</cursor></ProgressIndicator>
|
</cursor>
|
||||||
|
<effect>
|
||||||
|
<ColorAdjust brightness="-1.0" contrast="-0.00" hue="-0.5" saturation="-0.98" />
|
||||||
|
</effect></ProgressIndicator>
|
||||||
</Pane>
|
</Pane>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<Pane id="pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="750.0" stylesheets="@../style/default-theme.css" xmlns="http://javafx.com/javafx/8.0.112-ea" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane id="pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="750.0" stylesheets="@../style/default-theme.css" xmlns="http://javafx.com/javafx/8.0.112-ea" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<Rectangle id="Modpack-back" height="40.0" strokeType="INSIDE" width="750.0" />
|
<Rectangle id="home-back" height="40.0" strokeType="INSIDE" width="750.0" />
|
||||||
<Label id="lable" layoutX="339.0" layoutY="1.0" text="Home">
|
<Label id="lable" layoutX="339.0" layoutY="1.0" text="Home">
|
||||||
<font>
|
<font>
|
||||||
<Font name="Centaur" size="31.0" />
|
<Font name="Centaur" size="31.0" />
|
||||||
@ -22,7 +22,7 @@
|
|||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Label id="lable" layoutX="202.0" layoutY="67.0" text="PreDev-0.2.4" />
|
<Label id="lable" layoutX="202.0" layoutY="67.0" text="PreDev-0.2.4" />
|
||||||
<Label id="lable" layoutX="43.0" layoutY="98.0" text="Two new thems to cheack out :">
|
<Label id="lable" layoutX="43.0" layoutY="98.0" text="Two new themes to check out :">
|
||||||
<font>
|
<font>
|
||||||
<Font name="Centaur" size="18.0" />
|
<Font name="Centaur" size="18.0" />
|
||||||
</font>
|
</font>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<Pane id="pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="750.0" stylesheets="@../style/default-theme.css" xmlns="http://javafx.com/javafx/8.0.112-ea" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane id="pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="750.0" stylesheets="@../style/default-theme.css" xmlns="http://javafx.com/javafx/8.0.112-ea" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<Rectangle id="Modpack-back" height="40.0" strokeType="INSIDE" width="750.0" />
|
<Rectangle id="instance-back" height="40.0" width="750.0" />
|
||||||
<Label id="lable" layoutX="324.0" layoutY="1.0" text="Instances">
|
<Label id="lable" layoutX="324.0" layoutY="1.0" text="Instances">
|
||||||
<font>
|
<font>
|
||||||
<Font name="Centaur" size="31.0" />
|
<Font name="Centaur" size="31.0" />
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<Pane id="pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="750.0" stylesheets="@../style/default-theme.css" xmlns="http://javafx.com/javafx/8.0.112-ea" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane id="pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="750.0" stylesheets="@../style/default-theme.css" xmlns="http://javafx.com/javafx/8.0.112-ea" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<Rectangle id="Modpack-back" height="40.0" strokeType="INSIDE" width="750.0" />
|
<Rectangle id="Settings-back" height="40.0" strokeType="INSIDE" width="750.0" />
|
||||||
<Label id="lable" layoutX="331.0" layoutY="1.0" text="Settings">
|
<Label id="lable" layoutX="331.0" layoutY="1.0" text="Settings">
|
||||||
<font>
|
<font>
|
||||||
<Font name="Centaur" size="31.0" />
|
<Font name="Centaur" size="31.0" />
|
||||||
|
@ -67,9 +67,6 @@
|
|||||||
|
|
||||||
#login:hover {
|
#login:hover {
|
||||||
-fx-text-fill: #ffffff;
|
-fx-text-fill: #ffffff;
|
||||||
-fx-border-style: solid;
|
|
||||||
-fx-border-color: #49000d;
|
|
||||||
-fx-border-width: 0px 0px 2px 0px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#minecraft-login-btn {
|
#minecraft-login-btn {
|
||||||
@ -84,7 +81,7 @@
|
|||||||
-fx-text-fill: black;
|
-fx-text-fill: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Modpack-back {
|
#Modpack-back, #home-back, #Settings-back, #instance-back {
|
||||||
-fx-fill: #1d1d1d;
|
-fx-fill: #1d1d1d;
|
||||||
-fx-text-fill: white;
|
-fx-text-fill: white;
|
||||||
}
|
}
|
||||||
@ -103,7 +100,7 @@
|
|||||||
-fx-padding: 5px;
|
-fx-padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-modpacks:hover {
|
#search-modpacks:hover, #search-modpacks:focused {
|
||||||
-fx-border-style: solid;
|
-fx-border-style: solid;
|
||||||
-fx-border-color: white;
|
-fx-border-color: white;
|
||||||
-fx-border-width: 0px 0px 2px 0px;
|
-fx-border-width: 0px 0px 2px 0px;
|
||||||
|
@ -67,9 +67,6 @@
|
|||||||
|
|
||||||
#login:hover {
|
#login:hover {
|
||||||
-fx-text-fill: #ffffff;
|
-fx-text-fill: #ffffff;
|
||||||
-fx-border-style: solid;
|
|
||||||
-fx-border-color: #49000d;
|
|
||||||
-fx-border-width: 0px 0px 2px 0px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#minecraft-login-btn {
|
#minecraft-login-btn {
|
||||||
@ -84,7 +81,7 @@
|
|||||||
-fx-text-fill: white;
|
-fx-text-fill: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Modpack-back {
|
#Modpack-back, #home-back, #Settings-back, #instance-back {
|
||||||
-fx-fill: #0a0e2e;
|
-fx-fill: #0a0e2e;
|
||||||
-fx-text-fill: white;
|
-fx-text-fill: white;
|
||||||
}
|
}
|
||||||
@ -103,7 +100,7 @@
|
|||||||
-fx-padding: 5px;
|
-fx-padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-modpacks:hover {
|
#search-modpacks:hover, #search-modpacks:focused {
|
||||||
-fx-border-style: solid;
|
-fx-border-style: solid;
|
||||||
-fx-border-color: white;
|
-fx-border-color: white;
|
||||||
-fx-border-width: 0px 0px 2px 0px;
|
-fx-border-width: 0px 0px 2px 0px;
|
||||||
|
@ -67,9 +67,6 @@
|
|||||||
|
|
||||||
#login:hover {
|
#login:hover {
|
||||||
-fx-text-fill: black;
|
-fx-text-fill: black;
|
||||||
-fx-border-style: solid;
|
|
||||||
-fx-border-color: #49000d;
|
|
||||||
-fx-border-width: 0px 0px 2px 0px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#minecraft-login-btn {
|
#minecraft-login-btn {
|
||||||
@ -84,7 +81,7 @@
|
|||||||
-fx-text-fill: white;
|
-fx-text-fill: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Modpack-back {
|
#Modpack-back, #home-back, #Settings-back, #instance-back {
|
||||||
-fx-fill: #c3c3c3;
|
-fx-fill: #c3c3c3;
|
||||||
-fx-text-fill: black;
|
-fx-text-fill: black;
|
||||||
}
|
}
|
||||||
@ -103,7 +100,7 @@
|
|||||||
-fx-padding: 5px;
|
-fx-padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-modpacks:hover {
|
#search-modpacks:hover, #search-modpacks:focused {
|
||||||
-fx-border-style: solid;
|
-fx-border-style: solid;
|
||||||
-fx-border-color: #000000;
|
-fx-border-color: #000000;
|
||||||
-fx-border-width: 0px 0px 2px 0px;
|
-fx-border-width: 0px 0px 2px 0px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user