Online quest mode, fixed bug when swimming from hull to another, monitors with editable text, choosing exe in content package, monster quests, misc bugfixes
This commit is contained in:
+1
-1
@@ -105,7 +105,7 @@ namespace Launcher
|
||||
{
|
||||
SaveSettings(configPath);
|
||||
|
||||
Process.Start(Directory.GetCurrentDirectory() + "/Subsurface.exe");
|
||||
Process.Start(new ProcessStartInfo(Directory.GetCurrentDirectory() + "//"+settings.SelectedContentPackage.GetFilesOfType(ContentType.Executable)[0]));
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
|
||||
Generated
+76
-21
@@ -49,20 +49,25 @@
|
||||
this.itemFolder = new System.Windows.Forms.Button();
|
||||
this.structureFolder = new System.Windows.Forms.Button();
|
||||
this.jobFolder = new System.Windows.Forms.Button();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.exeBox = new System.Windows.Forms.TextBox();
|
||||
this.exeButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// packageList
|
||||
//
|
||||
this.packageList.FormattingEnabled = true;
|
||||
this.packageList.Location = new System.Drawing.Point(12, 73);
|
||||
this.packageList.Location = new System.Drawing.Point(12, 87);
|
||||
this.packageList.Name = "packageList";
|
||||
this.packageList.Size = new System.Drawing.Size(180, 342);
|
||||
this.packageList.Size = new System.Drawing.Size(180, 381);
|
||||
this.packageList.TabIndex = 3;
|
||||
this.packageList.SelectedIndexChanged += new System.EventHandler(this.packageList_SelectedIndexChanged);
|
||||
//
|
||||
// newPackageName
|
||||
//
|
||||
this.newPackageName.Location = new System.Drawing.Point(12, 421);
|
||||
this.newPackageName.Location = new System.Drawing.Point(12, 474);
|
||||
this.newPackageName.Name = "newPackageName";
|
||||
this.newPackageName.Size = new System.Drawing.Size(129, 20);
|
||||
this.newPackageName.TabIndex = 4;
|
||||
@@ -71,7 +76,7 @@
|
||||
// newPackage
|
||||
//
|
||||
this.newPackage.Enabled = false;
|
||||
this.newPackage.Location = new System.Drawing.Point(147, 421);
|
||||
this.newPackage.Location = new System.Drawing.Point(147, 474);
|
||||
this.newPackage.Name = "newPackage";
|
||||
this.newPackage.Size = new System.Drawing.Size(45, 20);
|
||||
this.newPackage.TabIndex = 5;
|
||||
@@ -84,7 +89,7 @@
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.label1.Location = new System.Drawing.Point(215, 285);
|
||||
this.label1.Location = new System.Drawing.Point(215, 338);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(51, 13);
|
||||
this.label1.TabIndex = 7;
|
||||
@@ -93,14 +98,14 @@
|
||||
// itemList
|
||||
//
|
||||
this.itemList.FormattingEnabled = true;
|
||||
this.itemList.Location = new System.Drawing.Point(218, 307);
|
||||
this.itemList.Location = new System.Drawing.Point(218, 360);
|
||||
this.itemList.Name = "itemList";
|
||||
this.itemList.Size = new System.Drawing.Size(255, 134);
|
||||
this.itemList.TabIndex = 8;
|
||||
//
|
||||
// itemButton
|
||||
//
|
||||
this.itemButton.Location = new System.Drawing.Point(301, 281);
|
||||
this.itemButton.Location = new System.Drawing.Point(317, 334);
|
||||
this.itemButton.Name = "itemButton";
|
||||
this.itemButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.itemButton.TabIndex = 9;
|
||||
@@ -113,7 +118,7 @@
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.label2.Location = new System.Drawing.Point(215, 120);
|
||||
this.label2.Location = new System.Drawing.Point(215, 173);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(77, 13);
|
||||
this.label2.TabIndex = 7;
|
||||
@@ -122,14 +127,15 @@
|
||||
// characterList
|
||||
//
|
||||
this.characterList.FormattingEnabled = true;
|
||||
this.characterList.Location = new System.Drawing.Point(218, 145);
|
||||
this.characterList.Location = new System.Drawing.Point(218, 198);
|
||||
this.characterList.Name = "characterList";
|
||||
this.characterList.Size = new System.Drawing.Size(255, 121);
|
||||
this.characterList.TabIndex = 8;
|
||||
this.characterList.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.fileList_KeyPress);
|
||||
//
|
||||
// characterButton
|
||||
//
|
||||
this.characterButton.Location = new System.Drawing.Point(301, 116);
|
||||
this.characterButton.Location = new System.Drawing.Point(317, 169);
|
||||
this.characterButton.Name = "characterButton";
|
||||
this.characterButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.characterButton.TabIndex = 9;
|
||||
@@ -142,7 +148,7 @@
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label3.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.label3.Location = new System.Drawing.Point(489, 121);
|
||||
this.label3.Location = new System.Drawing.Point(489, 174);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(96, 13);
|
||||
this.label3.TabIndex = 7;
|
||||
@@ -151,14 +157,14 @@
|
||||
// structureList
|
||||
//
|
||||
this.structureList.FormattingEnabled = true;
|
||||
this.structureList.Location = new System.Drawing.Point(492, 145);
|
||||
this.structureList.Location = new System.Drawing.Point(492, 198);
|
||||
this.structureList.Name = "structureList";
|
||||
this.structureList.Size = new System.Drawing.Size(255, 121);
|
||||
this.structureList.TabIndex = 8;
|
||||
//
|
||||
// structureButton
|
||||
//
|
||||
this.structureButton.Location = new System.Drawing.Point(603, 116);
|
||||
this.structureButton.Location = new System.Drawing.Point(591, 169);
|
||||
this.structureButton.Name = "structureButton";
|
||||
this.structureButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.structureButton.TabIndex = 9;
|
||||
@@ -168,7 +174,7 @@
|
||||
//
|
||||
// jobButton
|
||||
//
|
||||
this.jobButton.Location = new System.Drawing.Point(603, 281);
|
||||
this.jobButton.Location = new System.Drawing.Point(591, 334);
|
||||
this.jobButton.Name = "jobButton";
|
||||
this.jobButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.jobButton.TabIndex = 12;
|
||||
@@ -179,7 +185,7 @@
|
||||
// jobList
|
||||
//
|
||||
this.jobList.FormattingEnabled = true;
|
||||
this.jobList.Location = new System.Drawing.Point(492, 307);
|
||||
this.jobList.Location = new System.Drawing.Point(492, 360);
|
||||
this.jobList.Name = "jobList";
|
||||
this.jobList.Size = new System.Drawing.Size(255, 134);
|
||||
this.jobList.TabIndex = 11;
|
||||
@@ -189,7 +195,7 @@
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label4.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.label4.Location = new System.Drawing.Point(489, 286);
|
||||
this.label4.Location = new System.Drawing.Point(489, 339);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(48, 13);
|
||||
this.label4.TabIndex = 10;
|
||||
@@ -197,7 +203,7 @@
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.Location = new System.Drawing.Point(623, 503);
|
||||
this.okButton.Location = new System.Drawing.Point(623, 513);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(124, 37);
|
||||
this.okButton.TabIndex = 13;
|
||||
@@ -207,7 +213,7 @@
|
||||
//
|
||||
// characterFolder
|
||||
//
|
||||
this.characterFolder.Location = new System.Drawing.Point(398, 116);
|
||||
this.characterFolder.Location = new System.Drawing.Point(398, 169);
|
||||
this.characterFolder.Name = "characterFolder";
|
||||
this.characterFolder.Size = new System.Drawing.Size(75, 23);
|
||||
this.characterFolder.TabIndex = 9;
|
||||
@@ -217,7 +223,7 @@
|
||||
//
|
||||
// itemFolder
|
||||
//
|
||||
this.itemFolder.Location = new System.Drawing.Point(398, 280);
|
||||
this.itemFolder.Location = new System.Drawing.Point(398, 333);
|
||||
this.itemFolder.Name = "itemFolder";
|
||||
this.itemFolder.Size = new System.Drawing.Size(75, 23);
|
||||
this.itemFolder.TabIndex = 14;
|
||||
@@ -227,7 +233,7 @@
|
||||
//
|
||||
// structureFolder
|
||||
//
|
||||
this.structureFolder.Location = new System.Drawing.Point(672, 116);
|
||||
this.structureFolder.Location = new System.Drawing.Point(672, 169);
|
||||
this.structureFolder.Name = "structureFolder";
|
||||
this.structureFolder.Size = new System.Drawing.Size(75, 23);
|
||||
this.structureFolder.TabIndex = 15;
|
||||
@@ -237,7 +243,7 @@
|
||||
//
|
||||
// jobFolder
|
||||
//
|
||||
this.jobFolder.Location = new System.Drawing.Point(672, 281);
|
||||
this.jobFolder.Location = new System.Drawing.Point(672, 334);
|
||||
this.jobFolder.Name = "jobFolder";
|
||||
this.jobFolder.Size = new System.Drawing.Size(75, 23);
|
||||
this.jobFolder.TabIndex = 16;
|
||||
@@ -245,6 +251,46 @@
|
||||
this.jobFolder.UseVisualStyleBackColor = true;
|
||||
this.jobFolder.Click += new System.EventHandler(this.addFolderButton_Click);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BackColor = System.Drawing.Color.OrangeRed;
|
||||
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||
this.pictureBox1.Location = new System.Drawing.Point(0, 26);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(784, 42);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 17;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label5.ForeColor = System.Drawing.SystemColors.Control;
|
||||
this.label5.Location = new System.Drawing.Point(215, 87);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(63, 13);
|
||||
this.label5.TabIndex = 18;
|
||||
this.label5.Text = "Executable:";
|
||||
//
|
||||
// exeBox
|
||||
//
|
||||
this.exeBox.Enabled = false;
|
||||
this.exeBox.Location = new System.Drawing.Point(284, 84);
|
||||
this.exeBox.Name = "exeBox";
|
||||
this.exeBox.Size = new System.Drawing.Size(176, 20);
|
||||
this.exeBox.TabIndex = 19;
|
||||
//
|
||||
// exeButton
|
||||
//
|
||||
this.exeButton.Location = new System.Drawing.Point(466, 84);
|
||||
this.exeButton.Name = "exeButton";
|
||||
this.exeButton.Size = new System.Drawing.Size(32, 20);
|
||||
this.exeButton.TabIndex = 20;
|
||||
this.exeButton.Text = "...";
|
||||
this.exeButton.UseVisualStyleBackColor = true;
|
||||
this.exeButton.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// PackageManager
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -252,6 +298,10 @@
|
||||
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.ClientSize = new System.Drawing.Size(784, 562);
|
||||
this.Controls.Add(this.exeButton);
|
||||
this.Controls.Add(this.exeBox);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.jobFolder);
|
||||
this.Controls.Add(this.structureFolder);
|
||||
this.Controls.Add(this.itemFolder);
|
||||
@@ -275,6 +325,7 @@
|
||||
this.DoubleBuffered = true;
|
||||
this.Name = "PackageManager";
|
||||
this.Text = "PackageManager";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -302,6 +353,10 @@
|
||||
private System.Windows.Forms.Button itemFolder;
|
||||
private System.Windows.Forms.Button structureFolder;
|
||||
private System.Windows.Forms.Button jobFolder;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox exeBox;
|
||||
private System.Windows.Forms.Button exeButton;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,8 @@ namespace Launcher
|
||||
private ContentPackage selectedPackage;
|
||||
|
||||
private List<ListBox> fileBoxes;
|
||||
private List<TextBox> singleFileBoxes;
|
||||
|
||||
private List<Button> fileButtons;
|
||||
|
||||
public PackageManager(ContentPackage _selectedPackage)
|
||||
@@ -35,6 +37,8 @@ namespace Launcher
|
||||
fileBoxes = new List<ListBox>();
|
||||
fileButtons = new List<Button>();
|
||||
|
||||
singleFileBoxes = new List<TextBox>();
|
||||
|
||||
fileBoxes.Add(itemList);
|
||||
itemList.Tag = ContentType.Item;
|
||||
itemButton.Tag = ContentType.Item;
|
||||
@@ -63,6 +67,10 @@ namespace Launcher
|
||||
fileButtons.Add(jobButton);
|
||||
fileButtons.Add(jobFolder);
|
||||
|
||||
singleFileBoxes.Add(exeBox);
|
||||
exeBox.Tag = ContentType.Executable;
|
||||
exeButton.Tag = ContentType.Executable;
|
||||
|
||||
foreach (Button fileButton in fileButtons)
|
||||
{
|
||||
fileButton.Enabled = false;
|
||||
@@ -150,6 +158,28 @@ namespace Launcher
|
||||
}
|
||||
}
|
||||
|
||||
private void fileList_KeyPress(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (e.KeyCode != Keys.Delete) return;
|
||||
|
||||
ListBox listBox = sender as ListBox;
|
||||
|
||||
ContentType type = (listBox.Tag is ContentType) ? (ContentType)listBox.Tag : ContentType.None;
|
||||
Debug.Assert(type != ContentType.None, "ContentType of a button tag was ContentType.None");
|
||||
|
||||
List<ContentFile> selectedFiles = new List<ContentFile>();
|
||||
|
||||
foreach (ContentFile item in listBox.SelectedItems)
|
||||
{
|
||||
selectedFiles.Add(item);
|
||||
}
|
||||
|
||||
foreach (ContentFile file in selectedFiles)
|
||||
{
|
||||
RemoveFile(listBox, file);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddFile(ContentType type, string path)
|
||||
{
|
||||
ListBox selectedBox = null;
|
||||
@@ -161,10 +191,17 @@ namespace Launcher
|
||||
break;
|
||||
}
|
||||
|
||||
ContentFile newPackage = selectedPackage.AddFile(GetRelativePath(path, Directory.GetCurrentDirectory()), type);
|
||||
ContentFile newFile = selectedPackage.AddFile(GetRelativePath(path, Directory.GetCurrentDirectory()), type);
|
||||
|
||||
if (newPackage!=null) selectedBox.Items.Add(newPackage);
|
||||
|
||||
if (newFile!=null && selectedBox!=null) selectedBox.Items.Add(newFile);
|
||||
}
|
||||
|
||||
private void RemoveFile(ListBox listBox, ContentFile file)
|
||||
{
|
||||
if (file == null) return;
|
||||
|
||||
if (listBox != null) listBox.Items.Remove(file);
|
||||
selectedPackage.RemoveFile(file);
|
||||
}
|
||||
|
||||
private void addFolderButton_Click(object sender, EventArgs e)
|
||||
@@ -223,6 +260,39 @@ namespace Launcher
|
||||
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
Button button = sender as Button;
|
||||
|
||||
ContentType type = (button.Tag is ContentType) ? (ContentType)button.Tag : ContentType.None;
|
||||
Debug.Assert(type != ContentType.None, "ContentType of a button tag was ContentType.None");
|
||||
|
||||
TextBox selectedBox = null;
|
||||
foreach (TextBox fileBox in singleFileBoxes)
|
||||
{
|
||||
if (type != ((fileBox.Tag is ContentType) ? (ContentType)fileBox.Tag : ContentType.None)) continue;
|
||||
|
||||
selectedBox = fileBox;
|
||||
break;
|
||||
}
|
||||
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
ofd.Filter = (type == ContentType.Executable) ? "Executable (*.exe)|*.exe" : "XML files (*.xml)|*.xml;*.XML";
|
||||
ofd.Multiselect = false;
|
||||
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var existingFile = selectedPackage.files.Find(f => f.type == type);
|
||||
|
||||
if (existingFile!=null)
|
||||
{
|
||||
RemoveFile(null, existingFile);
|
||||
}
|
||||
|
||||
AddFile(type, ofd.FileName);
|
||||
selectedBox.Text = GetRelativePath(ofd.FileName, Directory.GetCurrentDirectory());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2771
-1
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user