mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-26 23:57:25 +01:00
v0.5.0 ! First release of new Dialogue Sketch feature.
This commit is contained in:
@@ -1 +1 @@
|
||||
start "" "javaw.exe" -Xmx512M -cp "lib\ATCS_v0.4.8.jar;lib\jide-oss.jar;lib\ui.jar;lib\junit-4.10.jar;lib\json_simple-1.1.jar;lib\rsyntaxtextarea.jar;lib\prefuse.jar;lib\AndorsTrainer_v0.1.2.jar;lib\bsh-2.0b4.jar" com.gpl.rpg.atcontentstudio.ATContentStudio
|
||||
start "" "javaw.exe" -Xmx512M -cp "lib\ATCS_v0.5.0.jar;lib\jide-oss.jar;lib\ui.jar;lib\junit-4.10.jar;lib\json_simple-1.1.jar;lib\rsyntaxtextarea.jar;lib\prefuse.jar;lib\AndorsTrainer_v0.1.2.jar;lib\bsh-2.0b4.jar" com.gpl.rpg.atcontentstudio.ATContentStudio
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
java -Xmx512M -cp lib/AndorsTrainer_v0.1.2.jar:lib/ATCS_v0.4.8.jar:lib/prefuse.jar:lib/json_simple-1.1.jar:lib/jide-oss.jar:lib/ui.jar:lib/junit-4.10.jar:lib/rsyntaxtextarea.jar:lib/bsh-2.0b4.jar com.gpl.rpg.atcontentstudio.ATContentStudio
|
||||
java -Xmx512M -cp lib/AndorsTrainer_v0.1.2.jar:lib/ATCS_v0.5.0.jar:lib/prefuse.jar:lib/json_simple-1.1.jar:lib/jide-oss.jar:lib/ui.jar:lib/junit-4.10.jar:lib/rsyntaxtextarea.jar:lib/bsh-2.0b4.jar com.gpl.rpg.atcontentstudio.ATContentStudio
|
||||
|
||||
@@ -1 +1 @@
|
||||
start "" "javaw.exe" -Xmx512M -cp "lib\ATCS_v0.4.6.jar;lib\jide-oss.jar;lib\ui.jar;lib\junit-4.10.jar;lib\json_simple-1.1.jar;lib\rsyntaxtextarea.jar;lib\prefuse.jar;lib\AndorsTrainer_v0.1.2.jar;lib\bsh-2.0b4.jar" com.gpl.rpg.atcontentstudio.ATContentStudio
|
||||
start "" "javaw.exe" -Xmx512M -cp "lib\ATCS_v0.5.0.jar;lib\jide-oss.jar;lib\ui.jar;lib\junit-4.10.jar;lib\json_simple-1.1.jar;lib\rsyntaxtextarea.jar;lib\prefuse.jar;lib\AndorsTrainer_v0.1.2.jar;lib\bsh-2.0b4.jar" com.gpl.rpg.atcontentstudio.ATContentStudio
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
!include MUI2.nsh
|
||||
|
||||
!define VERSION "0.4.8"
|
||||
!define VERSION "0.5.0"
|
||||
!define JAVA_BIN "java"
|
||||
|
||||
Name "Andor's Trail Content Studio v${VERSION}"
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.gpl.rpg.atcontentstudio.ui.WorkspaceSelector;
|
||||
public class ATContentStudio {
|
||||
|
||||
public static final String APP_NAME = "Andor's Trail Content Studio";
|
||||
public static final String APP_VERSION = "v0.4.8";
|
||||
public static final String APP_VERSION = "v0.5.0";
|
||||
|
||||
public static boolean STARTED = false;
|
||||
public static StudioFrame frame = null;
|
||||
|
||||
@@ -78,6 +78,14 @@ public class WriterModeData extends GameDataElement {
|
||||
|
||||
}
|
||||
|
||||
public WriterDialogue createDialogue(Dialogue dialogue) {
|
||||
if (dialogue.message == null) {
|
||||
return new SelectorDialogue(dialogue);
|
||||
} else {
|
||||
return new WriterDialogue(dialogue);
|
||||
}
|
||||
}
|
||||
|
||||
public class WriterDialogue extends WriterNode {
|
||||
public String id;
|
||||
public String id_prefix;
|
||||
@@ -104,7 +112,7 @@ public class WriterModeData extends GameDataElement {
|
||||
nodesById.put(this.id, this);
|
||||
if (dialogue.replies != null) {
|
||||
for (Dialogue.Reply reply : dialogue.replies) {
|
||||
if (Dialogue.Reply.GO_NEXT_TEXT.equals(reply.text)) {
|
||||
if (Dialogue.Reply.GO_NEXT_TEXT.equals(reply.text) || reply.text == null) {
|
||||
replies.add(new EmptyReply(this, reply));
|
||||
} else {
|
||||
replies.add(new WriterReply(this, reply));
|
||||
@@ -194,7 +202,9 @@ public class WriterModeData extends GameDataElement {
|
||||
modified.add(dialogue);
|
||||
} else {
|
||||
//Altering a game source Dialogue
|
||||
Dialogue clone = (Dialogue) dialogue.clone();
|
||||
//Dialogue clone = (Dialogue) dialogue.clone();
|
||||
dialogue.getProject().makeWritable(dialogue);
|
||||
Dialogue clone = dialogue.getProject().getDialogue(dialogue.id);
|
||||
if (this.replies != null) {
|
||||
for (WriterReply wReply : this.replies) {
|
||||
if (wReply.reply != null) {
|
||||
@@ -247,11 +257,19 @@ public class WriterModeData extends GameDataElement {
|
||||
|
||||
public abstract class SpecialDialogue extends WriterDialogue {
|
||||
|
||||
public SpecialDialogue() {}
|
||||
public boolean isSpecial() {return true;}
|
||||
public abstract SpecialDialogue duplicate();
|
||||
public SpecialDialogue(Dialogue dialogue) {
|
||||
super(dialogue);
|
||||
}
|
||||
}
|
||||
public class SelectorDialogue extends SpecialDialogue {
|
||||
public SelectorDialogue() {}
|
||||
public SpecialDialogue duplicate() {return new SelectorDialogue();}
|
||||
public SelectorDialogue(Dialogue dialogue) {
|
||||
super(dialogue);
|
||||
}
|
||||
}
|
||||
public class ShopDialogue extends SpecialDialogue {
|
||||
public static final String id = Dialogue.Reply.SHOP_PHRASE_ID;
|
||||
@@ -369,7 +387,7 @@ public class WriterModeData extends GameDataElement {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
public SpecialReply(WriterDialogue parent, Map json) {
|
||||
public SpecialReply(WriterDialogue parent, @SuppressWarnings("rawtypes") Map json) {
|
||||
super(parent, json);
|
||||
}
|
||||
}
|
||||
@@ -385,7 +403,7 @@ public class WriterModeData extends GameDataElement {
|
||||
text = Dialogue.Reply.GO_NEXT_TEXT;
|
||||
}
|
||||
|
||||
public EmptyReply(WriterDialogue parent, Map json) {
|
||||
public EmptyReply(WriterDialogue parent, @SuppressWarnings("rawtypes") Map json) {
|
||||
super(parent, json);
|
||||
text = Dialogue.Reply.GO_NEXT_TEXT;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class WriterModeDataSet implements ProjectTreeNode, Serializable {
|
||||
public GameSource parent;
|
||||
public File writerFile;
|
||||
|
||||
List<WriterModeData> writerModeDataList = new ArrayList<WriterModeData>();
|
||||
public List<WriterModeData> writerModeDataList = new ArrayList<WriterModeData>();
|
||||
|
||||
public WriterModeDataSet(GameSource gameSource) {
|
||||
this.parent = gameSource;
|
||||
@@ -79,6 +79,7 @@ public class WriterModeDataSet implements ProjectTreeNode, Serializable {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public Enumeration children() {
|
||||
return Collections.enumeration(writerModeDataList);
|
||||
@@ -201,6 +202,7 @@ public class WriterModeDataSet implements ProjectTreeNode, Serializable {
|
||||
return events;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void parse() {
|
||||
if (!writerFile.exists()) return;
|
||||
JSONParser parser = new JSONParser();
|
||||
@@ -210,7 +212,9 @@ public class WriterModeDataSet implements ProjectTreeNode, Serializable {
|
||||
List writerDataListJson = (List) parser.parse(reader);
|
||||
for (Object obj : writerDataListJson) {
|
||||
Map jsonObj = (Map)obj;
|
||||
writerModeDataList.add(new WriterModeData(this, jsonObj));
|
||||
WriterModeData data = new WriterModeData(this, jsonObj);
|
||||
data.writable = true;
|
||||
writerModeDataList.add(data);
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
Notification.addError("Error while parsing JSON file "+writerFile.getAbsolutePath()+": "+e.getMessage());
|
||||
@@ -252,6 +256,7 @@ public class WriterModeDataSet implements ProjectTreeNode, Serializable {
|
||||
}
|
||||
if (higherEmptyParent == this && !this.isEmpty()) higherEmptyParent = null;
|
||||
writerModeDataList.add(node);
|
||||
node.writable = true;
|
||||
if (node.jsonFile == null) node.jsonFile = this.writerFile;
|
||||
node.parent = this;
|
||||
if (higherEmptyParent != null) higherEmptyParent.notifyCreated();
|
||||
|
||||
@@ -241,10 +241,10 @@ public class ProjectsTree extends JPanel {
|
||||
addNextSeparator = true;
|
||||
popupMenu.add(new JMenuItem(actions.testWriter));
|
||||
}
|
||||
if (actions.testCommitWriter.isEnabled()) {
|
||||
addNextSeparator = true;
|
||||
popupMenu.add(new JMenuItem(actions.testCommitWriter));
|
||||
}
|
||||
// if (actions.testCommitWriter.isEnabled()) {
|
||||
// addNextSeparator = true;
|
||||
// popupMenu.add(new JMenuItem(actions.testCommitWriter));
|
||||
// }
|
||||
if (actions.createWriter.isEnabled()) {
|
||||
addNextSeparator = true;
|
||||
popupMenu.add(new JMenuItem(actions.createWriter));
|
||||
|
||||
@@ -195,6 +195,11 @@ public class StudioFrame extends JFrame {
|
||||
editors.openEditor(node);
|
||||
}
|
||||
|
||||
public void openEditor(WriterModeData node) {
|
||||
node.link();
|
||||
editors.openEditor(node);
|
||||
}
|
||||
|
||||
|
||||
public void openEditor(GameDataElement node) {
|
||||
if (node instanceof JSONElement) {
|
||||
@@ -203,6 +208,8 @@ public class StudioFrame extends JFrame {
|
||||
openEditor((Spritesheet) node);
|
||||
} else if (node instanceof TMXMap) {
|
||||
openEditor((TMXMap) node);
|
||||
} else if (node instanceof WriterModeData) {
|
||||
openEditor((WriterModeData) node);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,10 +221,6 @@ public class StudioFrame extends JFrame {
|
||||
editors.openEditor(node);
|
||||
}
|
||||
|
||||
public void openEditor(WriterModeData node) {
|
||||
editors.openEditor(node);
|
||||
}
|
||||
|
||||
public void closeEditor(ProjectTreeNode node) {
|
||||
editors.closeEditor(node);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -35,6 +34,7 @@ import com.gpl.rpg.atcontentstudio.model.maps.TMXMap;
|
||||
import com.gpl.rpg.atcontentstudio.model.maps.TMXMapSet;
|
||||
import com.gpl.rpg.atcontentstudio.model.saves.SavedGamesSet;
|
||||
import com.gpl.rpg.atcontentstudio.model.tools.writermode.WriterModeData;
|
||||
import com.gpl.rpg.atcontentstudio.model.tools.writermode.WriterModeDataSet;
|
||||
import com.gpl.rpg.atcontentstudio.ui.tools.BeanShellView;
|
||||
import com.gpl.rpg.atcontentstudio.ui.tools.ItemsTableView;
|
||||
import com.gpl.rpg.atcontentstudio.ui.tools.NPCsTableView;
|
||||
@@ -131,6 +131,9 @@ public class WorkspaceActions {
|
||||
} else if (element instanceof TMXMap) {
|
||||
TMXMapSet parent = (TMXMapSet) element.getParent();
|
||||
parent.tmxMaps.remove(element);
|
||||
} else if (element instanceof WriterModeData) {
|
||||
WriterModeDataSet parent = (WriterModeDataSet) element.getParent();
|
||||
parent.writerModeDataList.remove(element);
|
||||
}
|
||||
}
|
||||
new Thread() {
|
||||
@@ -169,6 +172,12 @@ public class WorkspaceActions {
|
||||
} else {
|
||||
new SaveItemsWizard(events, null).setVisible(true);
|
||||
}
|
||||
} else if (node instanceof TMXMap) {
|
||||
TMXMapSet parent = (TMXMapSet) node.getParent();
|
||||
parent.tmxMaps.remove(node);
|
||||
} else if (node instanceof WriterModeData) {
|
||||
WriterModeDataSet parent = (WriterModeDataSet) node.getParent();
|
||||
parent.writerModeDataList.remove(node);
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
@@ -315,7 +324,7 @@ public class WorkspaceActions {
|
||||
};
|
||||
};
|
||||
|
||||
public ATCSAction testWriter = new ATCSAction("Create dialogue sketch", "Test the Writer Mode"){
|
||||
public ATCSAction testWriter = new ATCSAction("Create dialogue sketch", "Create a dialogue sketch for fast dialogue edition"){
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (selectedNode == null || selectedNode.getProject() == null) return;
|
||||
new WriterSketchCreationWizard(selectedNode.getProject()).setVisible(true);
|
||||
@@ -336,7 +345,7 @@ public class WorkspaceActions {
|
||||
}
|
||||
};
|
||||
|
||||
public ATCSAction testCommitWriter = new ATCSAction("Export dialogue sketch", "Exports the dialogue sketch as real JSON data dialogues") {
|
||||
/*public ATCSAction testCommitWriter = new ATCSAction("Export dialogue sketch", "Exports the dialogue sketch as real JSON data dialogues") {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (selectedNode == null || selectedNode.getProject() == null || !(selectedNode instanceof WriterModeData)) return;
|
||||
WriterModeData wData = (WriterModeData)selectedNode;
|
||||
@@ -348,7 +357,7 @@ public class WorkspaceActions {
|
||||
public void selectionChanged(ProjectTreeNode selectedNode, TreePath[] selectedPaths) {
|
||||
setEnabled(selectedNode != null && selectedNode instanceof WriterModeData);
|
||||
}
|
||||
};
|
||||
};*/
|
||||
|
||||
public ATCSAction createWriter = new ATCSAction("Generate dialogue sketch", "Generates a dialogue sketch from this dialogue and its tree.") {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
@@ -379,7 +388,7 @@ public class WorkspaceActions {
|
||||
actions.add(showAbout);
|
||||
actions.add(exitATCS);
|
||||
actions.add(testWriter);
|
||||
actions.add(testCommitWriter);
|
||||
// actions.add(testCommitWriter);
|
||||
actions.add(createWriter);
|
||||
selectionChanged(null, null);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JInternalFrame;
|
||||
@@ -74,12 +75,15 @@ public class WriterModeEditor extends Editor {
|
||||
private JComponent overlay = null;
|
||||
private Display view;
|
||||
|
||||
private WriterModeData data;
|
||||
final private WriterModeData data;
|
||||
private WriterNode selected = null;
|
||||
private WriterNode prevSelected = null;
|
||||
|
||||
public WriterModeEditor(WriterModeData data) {
|
||||
this.target = data;
|
||||
this.data = data;
|
||||
this.name = data.id;
|
||||
this.icon = new ImageIcon(DefaultIcons.getDialogueIcon());
|
||||
selected = data.begin;
|
||||
view = new WriterGraphView();
|
||||
view.setLocation(0, 0);
|
||||
@@ -367,6 +371,7 @@ public class WriterModeEditor extends Editor {
|
||||
|
||||
@Override
|
||||
protected String getText(VisualItem item) {
|
||||
if (!item.getBoolean(IS_REPLY) && super.getText(item) == null) return "[Selector]";
|
||||
return wordWrap(super.getText(item), 40);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user