mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-28 07:17:42 +01:00
Warning hunt. Dialogue sketch I/O progress. Sketch creation from
existing Dialogue begins.
This commit is contained in:
@@ -10,7 +10,6 @@ import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -343,12 +342,25 @@ public class WorkspaceActions {
|
||||
WriterModeData wData = (WriterModeData)selectedNode;
|
||||
Collection<Dialogue> exported = wData.toDialogue();
|
||||
selectedNode.getProject().createElements(new ArrayList<JSONElement>(exported));
|
||||
wData.begin.dialogue.save();
|
||||
wData.save();
|
||||
};
|
||||
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) {
|
||||
if (selectedNode == null || selectedNode.getProject() == null || !(selectedNode instanceof Dialogue)) return;
|
||||
new WriterSketchCreationWizard(selectedNode.getProject(), (Dialogue)selectedNode).setVisible(true);
|
||||
|
||||
};
|
||||
public void selectionChanged(ProjectTreeNode selectedNode, TreePath[] selectedPaths) {
|
||||
setEnabled(selectedNode != null && selectedNode instanceof Dialogue);
|
||||
}
|
||||
};
|
||||
|
||||
List<ATCSAction> actions = new ArrayList<WorkspaceActions.ATCSAction>();
|
||||
|
||||
public WorkspaceActions() {
|
||||
@@ -368,6 +380,7 @@ public class WorkspaceActions {
|
||||
actions.add(exitATCS);
|
||||
actions.add(testWriter);
|
||||
actions.add(testCommitWriter);
|
||||
actions.add(createWriter);
|
||||
selectionChanged(null, null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user