Added "active" setting for SpawnAreas. Added cool tooltip to

DialogueGraphView
This commit is contained in:
Zukero
2015-10-30 14:02:38 +01:00
parent f5c454807c
commit 12ca21b9e4
4 changed files with 181 additions and 60 deletions

View File

@@ -146,6 +146,7 @@ public class TMXMapEditor extends Editor {
private JComboBox targetAreaCombo;
private JComboBox evaluateTriggerBox;
private JSpinner quantityField;
private JCheckBox activeForNewGame;
private JList npcList;
private SpawnGroupNpcListModel npcListModel;
@@ -547,6 +548,7 @@ public class TMXMapEditor extends Editor {
} else if (selected instanceof SpawnArea) {
areaField = addTextField(pane, "Spawn group ID: ", ((SpawnArea)selected).name, ((TMXMap)target).writable, listener);
quantityField = addIntegerField(pane, "Number of spawned NPCs: ", ((SpawnArea)selected).quantity, false, ((TMXMap)target).writable, listener);
activeForNewGame = addBooleanBasedCheckBox(pane, "Active in a new game: ", ((SpawnArea)selected).active, ((TMXMap)target).writable, listener);
npcListModel = new SpawnGroupNpcListModel((SpawnArea) selected);
npcList = new JList(npcListModel);
npcList.setCellRenderer(new GDERenderer(true, ((TMXMap)target).writable));
@@ -1800,6 +1802,11 @@ public class TMXMapEditor extends Editor {
SpawnArea area = (SpawnArea) selectedMapObject;
area.quantity = (Integer) value;
}
} else if (source == activeForNewGame) {
if (selectedMapObject instanceof SpawnArea) {
SpawnArea area = (SpawnArea) selectedMapObject;
area.active = (Boolean) value;
}
} else if (source == requirementTypeCombo) {
if (selectedMapObject instanceof KeyArea) {
KeyArea area = (KeyArea) selectedMapObject;