diff --git a/forge-adventure/pom.xml b/adventure-editor/pom.xml
similarity index 54%
rename from forge-adventure/pom.xml
rename to adventure-editor/pom.xml
index 1d730d49b9f..755ee3ac8af 100644
--- a/forge-adventure/pom.xml
+++ b/adventure-editor/pom.xml
@@ -7,41 +7,21 @@
4.0.0
- forge-adventure
+ adventure-editor
jar
- Forge Adventure
-
-
- 4thline-repo
- http://4thline.org/m2
-
- false
-
-
-
- jitpack.io
- https://jitpack.io
-
-
+ Map Editor
+
src/main/java
${project.basedir}
- **/*.vert
- **/*.frag
- **/title_bg_lq.png
- **/title_bg_lq_portrait.png
- **/transition.png
- **/adv_bg_texture.jpg
- **/adv_bg_splash.png
- **/bg_splash.png
- **/bg_texture.jpg
- **/font1.ttf
+ **/gear.gif
+ adventure-editor
maven-compiler-plugin
@@ -64,7 +44,7 @@
${basedir}/${configSourceDirectory}
- forge-adventure-editor.sh, forge-adventure-editor-mac.sh, forge-adventure-editor.command, forge-adventure-editor.cmd
+ adventure-editor.sh, adventure-editor.command, adventure-editor.cmd
${project.build.directory}
.
false
@@ -89,6 +69,9 @@
forge.adventure.Main
true
+
+ splash/gear.gif
+
@@ -106,56 +89,6 @@
-
- com.badlogicgames.gdx
- gdx
- 1.13.0
- compile
-
-
- com.badlogicgames.gdx
- gdx-platform
- 1.13.0
- natives-desktop
-
-
- com.badlogicgames.gdx
- gdx-freetype
- 1.13.0
-
-
- com.badlogicgames.gdx
- gdx-backend-lwjgl
- 1.13.0
- compile
-
-
- com.badlogicgames.gdx
- gdx-tools
- 1.13.0
- compile
-
-
- com.badlogicgames.gdx
- gdx-freetype-platform
- 1.13.0
- natives-desktop
-
-
- forge
- forge-core
- ${project.version}
-
-
- forge
- forge-gui
- ${project.version}
-
-
- forge
- forge-gui-mobile
- ${project.version}
-
org.jetbrains
annotations
@@ -163,21 +96,22 @@
compile
- com.badlogicgames.gdx-controllers
- gdx-controllers-desktop
- 2.2.3
-
-
- com.badlogicgames.gdx
- gdx
-
-
+ forge
+ forge-gui
+ 2.0.00-SNAPSHOT
+ compile
+
+
+ forge
+ forge-gui-mobile
+ 2.0.00-SNAPSHOT
+ compile
- 8
- 8
+ 17
+ 17
diff --git a/forge-adventure/sentry.properties b/adventure-editor/sentry.properties
similarity index 100%
rename from forge-adventure/sentry.properties
rename to adventure-editor/sentry.properties
diff --git a/adventure-editor/splash/gear.gif b/adventure-editor/splash/gear.gif
new file mode 100644
index 00000000000..1180c8264fb
Binary files /dev/null and b/adventure-editor/splash/gear.gif differ
diff --git a/forge-adventure/src/main/config/forge-adventure-editor.cmd b/adventure-editor/src/main/config/adventure-editor.cmd
similarity index 100%
rename from forge-adventure/src/main/config/forge-adventure-editor.cmd
rename to adventure-editor/src/main/config/adventure-editor.cmd
diff --git a/forge-adventure/src/main/config/forge-adventure-editor.command b/adventure-editor/src/main/config/adventure-editor.command
similarity index 100%
rename from forge-adventure/src/main/config/forge-adventure-editor.command
rename to adventure-editor/src/main/config/adventure-editor.command
diff --git a/forge-adventure/src/main/config/forge-adventure-editor.sh b/adventure-editor/src/main/config/adventure-editor.sh
similarity index 100%
rename from forge-adventure/src/main/config/forge-adventure-editor.sh
rename to adventure-editor/src/main/config/adventure-editor.sh
diff --git a/forge-adventure/src/main/config/forge-adventure-editor.ico b/adventure-editor/src/main/config/forge-adventure-editor.ico
similarity index 100%
rename from forge-adventure/src/main/config/forge-adventure-editor.ico
rename to adventure-editor/src/main/config/forge-adventure-editor.ico
diff --git a/forge-adventure/src/main/config/forge-adventure.ico b/adventure-editor/src/main/config/forge-adventure.ico
similarity index 100%
rename from forge-adventure/src/main/config/forge-adventure.ico
rename to adventure-editor/src/main/config/forge-adventure.ico
diff --git a/forge-adventure/src/main/config/forge.ico b/adventure-editor/src/main/config/forge.ico
similarity index 100%
rename from forge-adventure/src/main/config/forge.ico
rename to adventure-editor/src/main/config/forge.ico
diff --git a/forge-adventure/src/main/java/forge/adventure/Main.java b/adventure-editor/src/main/java/forge/adventure/Main.java
similarity index 88%
rename from forge-adventure/src/main/java/forge/adventure/Main.java
rename to adventure-editor/src/main/java/forge/adventure/Main.java
index 55de46c1215..bec6ae5a4ca 100644
--- a/forge-adventure/src/main/java/forge/adventure/Main.java
+++ b/adventure-editor/src/main/java/forge/adventure/Main.java
@@ -16,7 +16,6 @@ public class Main {
public static void main(String[] args) {
GuiBase.setInterface(new GuiMobile(Files.exists(Paths.get("./res"))?"./":"../forge-gui/"));
GuiBase.setDeviceInfo("", "", 0, 0);
- Config.instance();
- new EditorMainWindow();
+ new EditorMainWindow(Config.instance());
}
}
diff --git a/forge-adventure/src/main/java/forge/adventure/editor/BiomeEdit.java b/adventure-editor/src/main/java/forge/adventure/editor/BiomeEdit.java
similarity index 100%
rename from forge-adventure/src/main/java/forge/adventure/editor/BiomeEdit.java
rename to adventure-editor/src/main/java/forge/adventure/editor/BiomeEdit.java
diff --git a/forge-adventure/src/main/java/forge/adventure/editor/BiomeStructureDataMappingEditor.java b/adventure-editor/src/main/java/forge/adventure/editor/BiomeStructureDataMappingEditor.java
similarity index 100%
rename from forge-adventure/src/main/java/forge/adventure/editor/BiomeStructureDataMappingEditor.java
rename to adventure-editor/src/main/java/forge/adventure/editor/BiomeStructureDataMappingEditor.java
diff --git a/forge-adventure/src/main/java/forge/adventure/editor/BiomeStructureEdit.java b/adventure-editor/src/main/java/forge/adventure/editor/BiomeStructureEdit.java
similarity index 100%
rename from forge-adventure/src/main/java/forge/adventure/editor/BiomeStructureEdit.java
rename to adventure-editor/src/main/java/forge/adventure/editor/BiomeStructureEdit.java
diff --git a/forge-adventure/src/main/java/forge/adventure/editor/BiomeTerrainEdit.java b/adventure-editor/src/main/java/forge/adventure/editor/BiomeTerrainEdit.java
similarity index 100%
rename from forge-adventure/src/main/java/forge/adventure/editor/BiomeTerrainEdit.java
rename to adventure-editor/src/main/java/forge/adventure/editor/BiomeTerrainEdit.java
diff --git a/forge-adventure/src/main/java/forge/adventure/editor/DialogEdit.java b/adventure-editor/src/main/java/forge/adventure/editor/DialogEdit.java
similarity index 100%
rename from forge-adventure/src/main/java/forge/adventure/editor/DialogEdit.java
rename to adventure-editor/src/main/java/forge/adventure/editor/DialogEdit.java
diff --git a/forge-adventure/src/main/java/forge/adventure/editor/DialogEditor.java b/adventure-editor/src/main/java/forge/adventure/editor/DialogEditor.java
similarity index 100%
rename from forge-adventure/src/main/java/forge/adventure/editor/DialogEditor.java
rename to adventure-editor/src/main/java/forge/adventure/editor/DialogEditor.java
diff --git a/forge-adventure/src/main/java/forge/adventure/editor/DialogOptionEdit.java b/adventure-editor/src/main/java/forge/adventure/editor/DialogOptionEdit.java
similarity index 100%
rename from forge-adventure/src/main/java/forge/adventure/editor/DialogOptionEdit.java
rename to adventure-editor/src/main/java/forge/adventure/editor/DialogOptionEdit.java
diff --git a/forge-adventure/src/main/java/forge/adventure/editor/DialogOptionEditor.java b/adventure-editor/src/main/java/forge/adventure/editor/DialogOptionEditor.java
similarity index 100%
rename from forge-adventure/src/main/java/forge/adventure/editor/DialogOptionEditor.java
rename to adventure-editor/src/main/java/forge/adventure/editor/DialogOptionEditor.java
diff --git a/forge-adventure/src/main/java/forge/adventure/editor/DialogTree.java b/adventure-editor/src/main/java/forge/adventure/editor/DialogTree.java
similarity index 100%
rename from forge-adventure/src/main/java/forge/adventure/editor/DialogTree.java
rename to adventure-editor/src/main/java/forge/adventure/editor/DialogTree.java
diff --git a/forge-adventure/src/main/java/forge/adventure/editor/DocumentChangeListener.java b/adventure-editor/src/main/java/forge/adventure/editor/DocumentChangeListener.java
similarity index 100%
rename from forge-adventure/src/main/java/forge/adventure/editor/DocumentChangeListener.java
rename to adventure-editor/src/main/java/forge/adventure/editor/DocumentChangeListener.java
diff --git a/adventure-editor/src/main/java/forge/adventure/editor/EditorMainWindow.java b/adventure-editor/src/main/java/forge/adventure/editor/EditorMainWindow.java
new file mode 100644
index 00000000000..faa8019eaf3
--- /dev/null
+++ b/adventure-editor/src/main/java/forge/adventure/editor/EditorMainWindow.java
@@ -0,0 +1,97 @@
+package forge.adventure.editor;
+
+import forge.adventure.util.Config;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JFrame;
+import javax.swing.JOptionPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JToolBar;
+import javax.swing.UIManager;
+import java.awt.BorderLayout;
+import java.awt.Desktop;
+import java.awt.EventQueue;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.io.File;
+import java.security.CodeSource;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Editor class to edit configuration, maybe moved or removed
+ */
+public class EditorMainWindow extends JFrame {
+ public final static WorldEditor worldEditor = new WorldEditor();
+ JTabbedPane tabs = new JTabbedPane();
+
+ public EditorMainWindow(Config config) {
+ UIManager.LookAndFeelInfo[] var1 = UIManager.getInstalledLookAndFeels();
+
+ for (UIManager.LookAndFeelInfo info : var1) {
+ if ("Nimbus".equals(info.getName())) {
+ try {
+ UIManager.setLookAndFeel(info.getClassName());
+ } catch (Throwable ignored) {
+ }
+ break;
+ }
+ }
+ this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
+ this.addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(WindowEvent e) {
+ setVisible(false);
+ System.exit(0);
+ }
+ });
+ BorderLayout layout = new BorderLayout();
+ JToolBar toolBar = new JToolBar("toolbar");
+ JButton newButton = new JButton("GDX Particle Editor Tool");
+ newButton.addActionListener(e -> EventQueue.invokeLater(() -> {
+ newButton.setEnabled(false);
+ try {
+ CodeSource codeSource = EditorMainWindow.class.getProtectionDomain().getCodeSource();
+ File jarFile = new File(codeSource.getLocation().toURI().getPath());
+ String jarDir = jarFile.getParentFile().getPath();
+ Desktop.getDesktop().open(new File(jarDir + "/gdx-particle-editor.jar"));
+ } catch (Exception ex) {
+ new ErrorDialog("Error", ex.getMessage());
+ newButton.setEnabled(true);
+ }
+ }));
+ JButton quit = new JButton("Quit");
+ quit.addActionListener(e -> System.exit(0));
+ toolBar.add(newButton);
+ toolBar.add(quit);
+ setLayout(layout);
+ toolBar.setFloatable(false);
+ add(toolBar, BorderLayout.NORTH);
+ add(tabs, BorderLayout.CENTER);
+ tabs.addTab("World", worldEditor);
+ tabs.addTab("POI", new PointOfInterestEditor());
+ tabs.addTab("Items", new ItemsEditor());
+ tabs.addTab("Enemies", new EnemyEditor());
+ tabs.addTab("Quests", new QuestEditor());
+ setSize(config.getSettingData().width, config.getSettingData().height);
+ setLocationRelativeTo(null);
+ setVisible(true);
+ }
+
+ static class ErrorDialog {
+ public ErrorDialog(String title, String message) {
+ List