mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-26 23:57:25 +01:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec3afaaf36 | ||
|
|
9f978591ff | ||
|
|
7fff58d8f9 | ||
|
|
6192bd8dce | ||
|
|
be43a2a5d4 | ||
|
|
99524bf043 | ||
|
|
f2144ab446 | ||
|
|
ada045a13b | ||
|
|
4c4f7e5b92 |
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
|
||||
<jardesc>
|
||||
<jar path="ATCS/ATCS_v0.6.4.jar"/>
|
||||
<jar path="ATCS/ATCS_v0.6.5.jar"/>
|
||||
<options buildIfNeeded="true" compress="true" descriptionLocation="/ATCS/ATCS_JAR.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
|
||||
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
|
||||
<selectedProjects/>
|
||||
|
||||
1
packaging/ATCS_latest
Normal file
1
packaging/ATCS_latest
Normal file
@@ -0,0 +1 @@
|
||||
v0.6.5
|
||||
@@ -1,6 +1,6 @@
|
||||
!include MUI2.nsh
|
||||
|
||||
!define VERSION "0.6.4"
|
||||
!define VERSION "0.6.5"
|
||||
!define TRAINER_VERSION "0.1.4"
|
||||
!define JAVA_BIN "javaw"
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import prefuse.data.expression.parser.ExpressionParser;
|
||||
public class ATContentStudio {
|
||||
|
||||
public static final String APP_NAME = "Andor's Trail Content Studio";
|
||||
public static final String APP_VERSION = "v0.6.4";
|
||||
public static final String APP_VERSION = "v0.6.5";
|
||||
|
||||
public static final String CHECK_UPDATE_URL = "https://andorstrail.com/static/ATCS_latest";
|
||||
public static final String DOWNLOAD_URL = "https://andorstrail.com/viewtopic.php?f=6&t=4806";
|
||||
|
||||
@@ -19,20 +19,20 @@ public class KeyArea extends MapObject {
|
||||
String requireType = obj.getProperties().getProperty("requireType");
|
||||
String requireId = obj.getProperties().getProperty("requireId");
|
||||
String requireValue = obj.getProperties().getProperty("requireValue");
|
||||
oldSchoolRequirement = false;
|
||||
if (requireId == null) {
|
||||
String[] fields = obj.getName().split(":");
|
||||
if (fields.length == 2) {
|
||||
requireType = Requirement.RequirementType.questProgress.toString();
|
||||
requireValue = fields[1];
|
||||
requireId = fields[0];
|
||||
oldSchoolRequirement = true;
|
||||
} else if (fields.length == 3) {
|
||||
requireValue = fields[2];
|
||||
requireType = fields[0];
|
||||
requireId = fields[1];
|
||||
oldSchoolRequirement = true;
|
||||
}
|
||||
oldSchoolRequirement = true;
|
||||
} else {
|
||||
oldSchoolRequirement = false;
|
||||
}
|
||||
requirement = new Requirement();
|
||||
if (requireType != null) requirement.type = Requirement.RequirementType.valueOf(requireType);
|
||||
|
||||
@@ -109,7 +109,7 @@ public class WriterModeDataSet implements ProjectTreeNode, Serializable {
|
||||
|
||||
@Override
|
||||
public String getDesc() {
|
||||
return (needsSaving() ? "*" : "")+"Dialogue sketchs";
|
||||
return (needsSaving() ? "*" : "")+"Dialogue sketches";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -316,11 +316,15 @@ public abstract class Editor extends JPanel implements ProjectElementListener {
|
||||
// }
|
||||
|
||||
public static JSpinner addIntegerField(JPanel pane, String label, Integer initialValue, boolean allowNegatives, boolean editable, final FieldUpdateListener listener) {
|
||||
return addIntegerField(pane, label, initialValue, 0, allowNegatives, editable, listener);
|
||||
}
|
||||
|
||||
public static JSpinner addIntegerField(JPanel pane, String label, Integer initialValue, Integer defaultValue, boolean allowNegatives, boolean editable, final FieldUpdateListener listener) {
|
||||
JPanel tfPane = new JPanel();
|
||||
tfPane.setLayout(new JideBoxLayout(tfPane, JideBoxLayout.LINE_AXIS, 6));
|
||||
JLabel tfLabel = new JLabel(label);
|
||||
tfPane.add(tfLabel, JideBoxLayout.FIX);
|
||||
final JSpinner spinner = new JSpinner(new SpinnerNumberModel(initialValue != null ? initialValue.intValue() : 0, allowNegatives ? Integer.MIN_VALUE : 0, Integer.MAX_VALUE, 1));
|
||||
final JSpinner spinner = new JSpinner(new SpinnerNumberModel(initialValue != null ? initialValue.intValue() : defaultValue.intValue(), allowNegatives ? Integer.MIN_VALUE : 0, Integer.MAX_VALUE, 1));
|
||||
((JSpinner.DefaultEditor)spinner.getEditor()).getTextField().setHorizontalAlignment(JTextField.LEFT);
|
||||
spinner.setEnabled(editable);
|
||||
((DefaultFormatter)((NumberEditor)spinner.getEditor()).getTextField().getFormatter()).setCommitsOnValidEdit(true);
|
||||
|
||||
@@ -338,6 +338,7 @@ public class JSONImportWizard extends JDialog {
|
||||
} else if (existingNode.getDataType() == GameSource.Type.altered) {
|
||||
errors.add("An item with id "+node.id+" is already altered in this project.");
|
||||
} else {
|
||||
node.jsonFile = existingNode.jsonFile;
|
||||
warnings.add("An item with id "+node.id+" exists in the used game source. This one will be inserted as \"altered\"");
|
||||
}
|
||||
existingNode = null;
|
||||
@@ -412,7 +413,7 @@ public class JSONImportWizard extends JDialog {
|
||||
proj.createElements(created);
|
||||
JSONElement lastNode = created.get(created.size() - 1);
|
||||
if (lastNode != null) {
|
||||
lastNode.save();
|
||||
// lastNode.save();
|
||||
ATContentStudio.frame.selectInTree(lastNode);
|
||||
}
|
||||
JSONImportWizard.this.setVisible(false);
|
||||
|
||||
@@ -242,17 +242,17 @@ public class ProjectsTree extends JPanel {
|
||||
addNextSeparator = false;
|
||||
}
|
||||
|
||||
if (actions.testWriter.isEnabled()) {
|
||||
if (actions.createWriter.isEnabled()) {
|
||||
addNextSeparator = true;
|
||||
popupMenu.add(new JMenuItem(actions.testWriter));
|
||||
popupMenu.add(new JMenuItem(actions.createWriter));
|
||||
}
|
||||
// if (actions.testCommitWriter.isEnabled()) {
|
||||
// addNextSeparator = true;
|
||||
// popupMenu.add(new JMenuItem(actions.testCommitWriter));
|
||||
// }
|
||||
if (actions.createWriter.isEnabled()) {
|
||||
if (actions.generateWriter.isEnabled()) {
|
||||
addNextSeparator = true;
|
||||
popupMenu.add(new JMenuItem(actions.createWriter));
|
||||
popupMenu.add(new JMenuItem(actions.generateWriter));
|
||||
}
|
||||
if (addNextSeparator) {
|
||||
popupMenu.add(new JSeparator());
|
||||
|
||||
@@ -399,7 +399,7 @@ public class WorkspaceActions {
|
||||
};
|
||||
};
|
||||
|
||||
public ATCSAction testWriter = new ATCSAction("Create dialogue sketch", "Create a dialogue sketch for fast dialogue edition"){
|
||||
public ATCSAction createWriter = 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);
|
||||
@@ -434,7 +434,7 @@ public class WorkspaceActions {
|
||||
}
|
||||
};*/
|
||||
|
||||
public ATCSAction createWriter = new ATCSAction("Generate dialogue sketch", "Generates a dialogue sketch from this dialogue and its tree.") {
|
||||
public ATCSAction generateWriter = 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);
|
||||
@@ -472,9 +472,9 @@ public class WorkspaceActions {
|
||||
actions.add(exportProject);
|
||||
actions.add(showAbout);
|
||||
actions.add(exitATCS);
|
||||
actions.add(testWriter);
|
||||
// actions.add(testCommitWriter);
|
||||
actions.add(createWriter);
|
||||
// actions.add(testCommitWriter);
|
||||
actions.add(generateWriter);
|
||||
actions.add(editWorkspaceSettings);
|
||||
selectionChanged(null, null);
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ public class ItemEditor extends JSONElementEditor {
|
||||
hitSourceConditionChance = addDoubleField(pane, "Chance: ", condition.chance, writable, listener);
|
||||
hitSourceConditionApply = new JRadioButton("Apply new condition");
|
||||
pane.add(hitSourceConditionApply, JideBoxLayout.FIX);
|
||||
hitSourceConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude == null ? null : condition.magnitude >= 0 ? condition.magnitude : 0, false, writable, listener);
|
||||
hitSourceConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude == null ? null : condition.magnitude >= 0 ? condition.magnitude : 0, 1, false, writable, listener);
|
||||
hitSourceConditionDuration = addIntegerField(pane, "Duration: ", condition.duration, false, writable, listener);
|
||||
hitSourceConditionClear = new JRadioButton("Clear active condition");
|
||||
pane.add(hitSourceConditionClear, JideBoxLayout.FIX);
|
||||
@@ -543,7 +543,7 @@ public class ItemEditor extends JSONElementEditor {
|
||||
hitTargetConditionChance = addDoubleField(pane, "Chance: ", condition.chance, writable, listener);
|
||||
hitTargetConditionApply = new JRadioButton("Apply new condition");
|
||||
pane.add(hitTargetConditionApply, JideBoxLayout.FIX);
|
||||
hitTargetConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude == null ? null : condition.magnitude >= 0 ? condition.magnitude : 0, false, writable, listener);
|
||||
hitTargetConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude == null ? null : condition.magnitude >= 0 ? condition.magnitude : 0, 1, false, writable, listener);
|
||||
hitTargetConditionDuration = addIntegerField(pane, "Duration: ", condition.duration, false, writable, listener);
|
||||
hitTargetConditionClear = new JRadioButton("Clear active condition");
|
||||
pane.add(hitTargetConditionClear, JideBoxLayout.FIX);
|
||||
@@ -599,7 +599,7 @@ public class ItemEditor extends JSONElementEditor {
|
||||
killSourceConditionChance = addDoubleField(pane, "Chance: ", condition.chance, writable, listener);
|
||||
killSourceConditionApply = new JRadioButton("Apply new condition");
|
||||
pane.add(killSourceConditionApply, JideBoxLayout.FIX);
|
||||
killSourceConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude == null ? null : condition.magnitude >= 0 ? condition.magnitude : 0, false, writable, listener);
|
||||
killSourceConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude == null ? null : condition.magnitude >= 0 ? condition.magnitude : 0, 1, false, writable, listener);
|
||||
killSourceConditionDuration = addIntegerField(pane, "Duration: ", condition.duration, false, writable, listener);
|
||||
killSourceConditionClear = new JRadioButton("Clear active condition");
|
||||
pane.add(killSourceConditionClear, JideBoxLayout.FIX);
|
||||
@@ -651,7 +651,7 @@ public class ItemEditor extends JSONElementEditor {
|
||||
Project proj = ((Item)target).getProject();
|
||||
|
||||
equipConditionBox = addActorConditionBox(pane, proj, "Actor Condition: ", condition.condition, writable, listener);
|
||||
equipConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude, false, writable, listener);
|
||||
equipConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude, 1, false, writable, listener);
|
||||
|
||||
pane.revalidate();
|
||||
pane.repaint();
|
||||
|
||||
@@ -181,12 +181,12 @@ public class NPCEditor extends JSONElementEditor {
|
||||
moveTypeBox = addEnumValueBox(pane, "Movement type: ", NPC.MovementType.values(), npc.movement_type, npc.writable, listener);
|
||||
combatTraitPane = new CollapsiblePanel("Combat traits: ");
|
||||
combatTraitPane.setLayout(new JideBoxLayout(combatTraitPane, JideBoxLayout.PAGE_AXIS, 6));
|
||||
maxHP = addIntegerField(combatTraitPane, "Max HP: ", npc.max_hp, false, npc.writable, listener);
|
||||
maxAP = addIntegerField(combatTraitPane, "Max AP: ", npc.max_ap, false, npc.writable, listener);
|
||||
moveCost = addIntegerField(combatTraitPane, "Move cost: ", npc.move_cost, false, npc.writable, listener);
|
||||
maxHP = addIntegerField(combatTraitPane, "Max HP: ", npc.max_hp, 1, false, npc.writable, listener);
|
||||
maxAP = addIntegerField(combatTraitPane, "Max AP: ", npc.max_ap, 10, false, npc.writable, listener);
|
||||
moveCost = addIntegerField(combatTraitPane, "Move cost: ", npc.move_cost, 10, false, npc.writable, listener);
|
||||
atkDmgMin = addIntegerField(combatTraitPane, "Attack Damage min: ", npc.attack_damage_min, false, npc.writable, listener);
|
||||
atkDmgMax = addIntegerField(combatTraitPane, "Attack Damage max: ", npc.attack_damage_max, false, npc.writable, listener);
|
||||
atkCost = addIntegerField(combatTraitPane, "Attack cost: ", npc.attack_cost, false, npc.writable, listener);
|
||||
atkCost = addIntegerField(combatTraitPane, "Attack cost: ", npc.attack_cost, 10, false, npc.writable, listener);
|
||||
atkChance = addIntegerField(combatTraitPane, "Attack chance: ", npc.attack_chance, false, npc.writable, listener);
|
||||
critSkill = addIntegerField(combatTraitPane, "Critical skill: ", npc.critical_skill, false, npc.writable, listener);
|
||||
critMult = addDoubleField(combatTraitPane, "Critical multiplier: ", npc.critical_multiplier, npc.writable, listener);
|
||||
@@ -323,7 +323,7 @@ public class NPCEditor extends JSONElementEditor {
|
||||
Project proj = ((NPC)target).getProject();
|
||||
|
||||
sourceConditionBox = addActorConditionBox(pane, proj, "Actor Condition: ", condition.condition, writable, listener);
|
||||
sourceConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude, false, writable, listener);
|
||||
sourceConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude, 1, false, writable, listener);
|
||||
sourceConditionDuration = addIntegerField(pane, "Duration: ", condition.duration, false, writable, listener);
|
||||
sourceConditionChance = addDoubleField(pane, "Chance: ", condition.chance, writable, listener);
|
||||
|
||||
@@ -341,7 +341,7 @@ public class NPCEditor extends JSONElementEditor {
|
||||
Project proj = ((NPC)target).getProject();
|
||||
|
||||
targetConditionBox = addActorConditionBox(pane, proj, "Actor Condition: ", condition.condition, writable, listener);
|
||||
targetConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude, false, writable, listener);
|
||||
targetConditionMagnitude = addIntegerField(pane, "Magnitude: ", condition.magnitude, 1, false, writable, listener);
|
||||
targetConditionDuration = addIntegerField(pane, "Duration: ", condition.duration, false, writable, listener);
|
||||
targetConditionChance = addDoubleField(pane, "Chance: ", condition.chance, writable, listener);
|
||||
|
||||
|
||||
@@ -206,11 +206,12 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
|
||||
|
||||
JScrollPane tmxScroller = new JScrollPane(getTmxEditorPane(), JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
JScrollPane xmlScroller = new JScrollPane(getXmlEditorPane(), JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
JScrollPane replScroller = new JScrollPane(getReplacementSimulatorPane(), JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
//JScrollPane replScroller = new JScrollPane(getReplacementSimulatorPane(), JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
|
||||
xmlScroller.getVerticalScrollBar().setUnitIncrement(16);
|
||||
editorTabsHolder.add("TMX", tmxScroller);
|
||||
editorTabsHolder.add("XML", xmlScroller);
|
||||
editorTabsHolder.add("Replacements", replScroller);
|
||||
//editorTabsHolder.add("Replacements", replScroller);
|
||||
editorTabsHolder.add("Replacements", getReplacementSimulatorPane());
|
||||
|
||||
}
|
||||
|
||||
@@ -523,6 +524,7 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
|
||||
if (selected instanceof ContainerArea) {
|
||||
droplistBox = addDroplistBox(pane, ((TMXMap)target).getProject(), "Droplist: ", ((ContainerArea)selected).droplist, ((TMXMap)target).writable, listener);
|
||||
} else if (selected instanceof KeyArea) {
|
||||
areaField = addTextField(pane, "Area ID: ", ((KeyArea)selected).name, ((TMXMap)target).writable, listener);
|
||||
dialogueBox = addDialogueBox(pane, ((TMXMap)target).getProject(), "Message when locked: ", ((KeyArea)selected).dialogue, ((TMXMap)target).writable, listener);
|
||||
requirementTypeCombo = addEnumValueBox(pane, "Requirement type: ", Requirement.RequirementType.values(), ((KeyArea)selected).requirement.type, ((TMXMap)target).writable, listener);
|
||||
requirementParamsPane = new JPanel();
|
||||
@@ -785,7 +787,7 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
|
||||
activateAndViewPane.setLayout(new JideBoxLayout(activateAndViewPane, JideBoxLayout.LINE_AXIS));
|
||||
|
||||
activateAndViewPane.add(areasActivationPane, JideBoxLayout.FIX);
|
||||
activateAndViewPane.add(viewer, JideBoxLayout.VARY);
|
||||
activateAndViewPane.add(new JScrollPane(viewer), JideBoxLayout.VARY);
|
||||
|
||||
replacementSimulator.add(walkableVisibleBox, JideBoxLayout.FIX);
|
||||
replacementSimulator.add(activateAndViewPane, JideBoxLayout.VARY);
|
||||
@@ -2062,9 +2064,9 @@ public class TMXMapEditor extends Editor implements TMXMap.MapChangedOnDiskListe
|
||||
if (modified) {
|
||||
if (map.state != GameDataElement.State.modified) {
|
||||
map.state = GameDataElement.State.modified;
|
||||
map.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||
ATContentStudio.frame.editorChanged(TMXMapEditor.this);
|
||||
}
|
||||
map.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,14 +10,18 @@ import java.awt.event.FocusListener;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JEditorPane;
|
||||
import javax.swing.JInternalFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
@@ -57,6 +61,9 @@ import prefuse.visual.EdgeItem;
|
||||
import prefuse.visual.VisualItem;
|
||||
import prefuse.visual.expression.InGroupPredicate;
|
||||
|
||||
import com.gpl.rpg.atcontentstudio.ATContentStudio;
|
||||
import com.gpl.rpg.atcontentstudio.model.GameDataElement;
|
||||
import com.gpl.rpg.atcontentstudio.model.ProjectTreeNode;
|
||||
import com.gpl.rpg.atcontentstudio.model.gamedata.Dialogue;
|
||||
import com.gpl.rpg.atcontentstudio.model.tools.writermode.WriterModeData;
|
||||
import com.gpl.rpg.atcontentstudio.model.tools.writermode.WriterModeData.EmptyReply;
|
||||
@@ -71,8 +78,19 @@ import com.jidesoft.swing.JideBoxLayout;
|
||||
public class WriterModeEditor extends Editor {
|
||||
|
||||
private static final long serialVersionUID = -6591631891278528494L;
|
||||
|
||||
private static final String HELP_TEXT =
|
||||
"<html><body><table>"
|
||||
+ "<tr><td valign=\"middle\">(Esc.)</td><td valign=\"middle\"> Cancel edition</td></tr>"
|
||||
+ "<tr><td valign=\"middle\">(Ctrl+Enter)</td><td valign=\"middle\"> Confirm changes</td></tr>"
|
||||
+ "<tr><td valign=\"middle\">(Shift+Enter)</td><td valign=\"middle\"> Create next of same kind</td></tr>"
|
||||
+ "<tr><td valign=\"middle\">(Alt+Enter)</td><td valign=\"middle\"> Create next of other kind</td></tr>"
|
||||
+ "</table></body></html>";
|
||||
|
||||
|
||||
|
||||
private JComponent overlay = null;
|
||||
private JComponent helpWindow = null;
|
||||
private Display view;
|
||||
|
||||
final private WriterModeData data;
|
||||
@@ -87,12 +105,19 @@ public class WriterModeEditor extends Editor {
|
||||
selected = data.begin;
|
||||
view = new WriterGraphView();
|
||||
view.setLocation(0, 0);
|
||||
|
||||
setLayout(new BorderLayout());
|
||||
add(createButtonPane(), BorderLayout.NORTH);
|
||||
add(view, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
|
||||
public void dataAltered() {
|
||||
data.state = GameDataElement.State.modified;
|
||||
data.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||
ATContentStudio.frame.editorChanged(this);
|
||||
}
|
||||
|
||||
public JPanel createButtonPane() {
|
||||
JPanel pane = new JPanel();
|
||||
pane.setLayout(new JideBoxLayout(pane, JideBoxLayout.LINE_AXIS));
|
||||
@@ -102,6 +127,8 @@ public class WriterModeEditor extends Editor {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
data.save();
|
||||
data.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||
ATContentStudio.frame.editorChanged(WriterModeEditor.this);
|
||||
}
|
||||
});
|
||||
export.addActionListener(new ActionListener() {
|
||||
@@ -111,6 +138,8 @@ public class WriterModeEditor extends Editor {
|
||||
data.getProject().createElements(created);
|
||||
//data.begin.dialogue.save();
|
||||
data.save();
|
||||
data.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||
ATContentStudio.frame.editorChanged(WriterModeEditor.this);
|
||||
}
|
||||
});
|
||||
pane.add(save, JideBoxLayout.FIX);
|
||||
@@ -135,6 +164,22 @@ public class WriterModeEditor extends Editor {
|
||||
}
|
||||
|
||||
|
||||
private void createHelpWindow() {
|
||||
JInternalFrame window = new JInternalFrame("Help", true, true);
|
||||
window.setLayout(new BorderLayout());
|
||||
JEditorPane area = new JEditorPane();
|
||||
area.setContentType("text/html");
|
||||
area.setText(HELP_TEXT);
|
||||
area.setEditable(false);
|
||||
|
||||
window.add(new JScrollPane(area));
|
||||
window.setSize(350, 250);
|
||||
window.setLocation(0, 0);
|
||||
|
||||
view.add(window);
|
||||
helpWindow = window;
|
||||
}
|
||||
|
||||
public static final String GRAPH = "graph";
|
||||
public static final String NODES = "graph.nodes";
|
||||
public static final String NULL_NODES = "graph.nullNodes";
|
||||
@@ -587,6 +632,7 @@ public class WriterModeEditor extends Editor {
|
||||
addEdge(selected, target);
|
||||
}
|
||||
}
|
||||
dataAltered();
|
||||
}
|
||||
|
||||
static final String disposeEditorString = "disposeEditor";
|
||||
@@ -612,6 +658,7 @@ public class WriterModeEditor extends Editor {
|
||||
revalidate();
|
||||
repaint();
|
||||
disposeOverlay();
|
||||
dataAltered();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -654,6 +701,7 @@ public class WriterModeEditor extends Editor {
|
||||
revalidate();
|
||||
repaint();
|
||||
}
|
||||
dataAltered();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -695,7 +743,7 @@ public class WriterModeEditor extends Editor {
|
||||
revalidate();
|
||||
repaint();
|
||||
}
|
||||
|
||||
dataAltered();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -721,7 +769,20 @@ public class WriterModeEditor extends Editor {
|
||||
revalidate();
|
||||
repaint();
|
||||
}
|
||||
|
||||
dataAltered();
|
||||
}
|
||||
};
|
||||
|
||||
static final String showHelpString = "showHelp";
|
||||
final AbstractAction showHelp = new AbstractAction("Show help window") {
|
||||
private static final long serialVersionUID = 1658086056088672748L;
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (helpWindow == null) {
|
||||
createHelpWindow();
|
||||
}
|
||||
helpWindow.setVisible(true);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -812,6 +873,8 @@ public class WriterModeEditor extends Editor {
|
||||
area.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.ALT_DOWN_MASK, true), commitAndCreateNextDefaultNodeString);
|
||||
area.getActionMap().put(commitAndCreateNextDefaultNodeString, commitAndCreateNextDefaultNode);
|
||||
|
||||
area.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0, true), showHelpString);
|
||||
area.getActionMap().put(showHelpString, showHelp);
|
||||
|
||||
if (selected instanceof WriterDialogue) {
|
||||
area.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.SHIFT_DOWN_MASK, true), createContinueTalkingNodeString);
|
||||
@@ -1081,8 +1144,8 @@ public class WriterModeEditor extends Editor {
|
||||
|
||||
@Override
|
||||
public void targetUpdated() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
this.icon = new ImageIcon(((GameDataElement)target).getIcon());
|
||||
this.name = ((GameDataElement)target).getDesc();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -128,13 +128,13 @@ public class FileUtils {
|
||||
case Windows:
|
||||
System.err.println("Trying the Windows way with mklink");
|
||||
try {
|
||||
Runtime.getRuntime().exec("cmd.exe /C mklink "+(targetFile.isDirectory() ? "/J " : "")+linkFile.getAbsolutePath()+" "+targetFile.getAbsolutePath());
|
||||
Runtime.getRuntime().exec("cmd.exe /C mklink "+(targetFile.isDirectory() ? "/J " : "")+"\""+linkFile.getAbsolutePath()+"\" \""+targetFile.getAbsolutePath()+"\"");
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
System.err.println("Attempting UAC elevation through VBS script.");
|
||||
if (!linkFile.exists()) {
|
||||
runWithUac("cmd.exe /C mklink "+(targetFile.isDirectory() ? "/J " : "")+linkFile.getAbsolutePath()+" "+targetFile.getAbsolutePath(), 3, linkFile);
|
||||
System.err.println("Attempting UAC elevation through VBS script.");
|
||||
runWithUac("cmd.exe /C mklink "+(targetFile.isDirectory() ? "/J " : "")+"\""+linkFile.getAbsolutePath()+"\" \""+targetFile.getAbsolutePath()+"\"", 3, linkFile);
|
||||
}
|
||||
break;
|
||||
case MacOS:
|
||||
|
||||
Reference in New Issue
Block a user