1
0
mirror of synced 2025-01-31 12:23:52 +01:00

Load IArchives if added to object editor

This commit is contained in:
KillzXGaming 2019-07-31 20:40:16 -04:00
parent d244ceab0a
commit 9c98ff2c83
7 changed files with 95 additions and 49 deletions

View File

@ -33,10 +33,8 @@
this.stPanel2 = new Toolbox.Library.Forms.STPanel();
this.stPanel1 = new Toolbox.Library.Forms.STPanel();
this.stToolStrip1 = new Toolbox.Library.Forms.STToolStrip();
this.searchFormToolStrip = new System.Windows.Forms.ToolStripButton();
this.treeViewCustom1 = new Toolbox.Library.TreeViewCustom();
this.stPanel3 = new Toolbox.Library.Forms.STPanel();
this.searchImgPB = new System.Windows.Forms.PictureBox();
this.activeEditorChkBox = new Toolbox.Library.Forms.STCheckBox();
this.objectEditorMenu = new Toolbox.Library.Forms.STMenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -44,11 +42,14 @@
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sortToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.treeNodeContextMenu = new Toolbox.Library.Forms.STContextMenuStrip(this.components);
this.searchFormToolStrip = new System.Windows.Forms.ToolStripButton();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.searchImgPB = new System.Windows.Forms.PictureBox();
this.stPanel1.SuspendLayout();
this.stToolStrip1.SuspendLayout();
this.stPanel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.searchImgPB)).BeginInit();
this.objectEditorMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.searchImgPB)).BeginInit();
this.SuspendLayout();
//
// splitter1
@ -84,6 +85,7 @@
// stToolStrip1
//
this.stToolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1,
this.searchFormToolStrip});
this.stToolStrip1.Location = new System.Drawing.Point(0, 26);
this.stToolStrip1.Name = "stToolStrip1";
@ -91,16 +93,6 @@
this.stToolStrip1.TabIndex = 3;
this.stToolStrip1.Text = "stToolStrip1";
//
// searchFormToolStrip
//
this.searchFormToolStrip.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.searchFormToolStrip.Image = global::Toolbox.Library.Properties.Resources.Antu_edit_find_mail1;
this.searchFormToolStrip.ImageTransparentColor = System.Drawing.Color.Magenta;
this.searchFormToolStrip.Name = "searchFormToolStrip";
this.searchFormToolStrip.Size = new System.Drawing.Size(23, 22);
this.searchFormToolStrip.Text = "toolStripButton1";
this.searchFormToolStrip.Click += new System.EventHandler(this.searchFormToolStrip_Click);
//
// treeViewCustom1
//
this.treeViewCustom1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -135,18 +127,6 @@
this.stPanel3.Size = new System.Drawing.Size(314, 26);
this.stPanel3.TabIndex = 2;
//
// searchImgPB
//
this.searchImgPB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.searchImgPB.BackColor = System.Drawing.Color.Transparent;
this.searchImgPB.Image = global::Toolbox.Library.Properties.Resources.Antu_edit_find_mail_svg;
this.searchImgPB.Location = new System.Drawing.Point(-654, 5);
this.searchImgPB.Name = "searchImgPB";
this.searchImgPB.Size = new System.Drawing.Size(22, 17);
this.searchImgPB.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.searchImgPB.TabIndex = 1;
this.searchImgPB.TabStop = false;
//
// activeEditorChkBox
//
this.activeEditorChkBox.AutoSize = true;
@ -205,6 +185,38 @@
this.treeNodeContextMenu.Name = "treeNodeContextMenu";
this.treeNodeContextMenu.Size = new System.Drawing.Size(61, 4);
//
// searchFormToolStrip
//
this.searchFormToolStrip.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.searchFormToolStrip.Image = global::Toolbox.Library.Properties.Resources.Antu_edit_find_mail1;
this.searchFormToolStrip.ImageTransparentColor = System.Drawing.Color.Magenta;
this.searchFormToolStrip.Name = "searchFormToolStrip";
this.searchFormToolStrip.Size = new System.Drawing.Size(23, 22);
this.searchFormToolStrip.Text = "toolStripButton1";
this.searchFormToolStrip.Click += new System.EventHandler(this.searchFormToolStrip_Click);
//
// toolStripButton1
//
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton1.Image = global::Toolbox.Library.Properties.Resources.AddIcon;
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
this.toolStripButton1.Text = "toolStripButton1";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// searchImgPB
//
this.searchImgPB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.searchImgPB.BackColor = System.Drawing.Color.Transparent;
this.searchImgPB.Image = global::Toolbox.Library.Properties.Resources.Antu_edit_find_mail_svg;
this.searchImgPB.Location = new System.Drawing.Point(-654, 5);
this.searchImgPB.Name = "searchImgPB";
this.searchImgPB.Size = new System.Drawing.Size(22, 17);
this.searchImgPB.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.searchImgPB.TabIndex = 1;
this.searchImgPB.TabStop = false;
//
// ObjectEditorTree
//
this.Controls.Add(this.splitter1);
@ -218,9 +230,9 @@
this.stToolStrip1.PerformLayout();
this.stPanel3.ResumeLayout(false);
this.stPanel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.searchImgPB)).EndInit();
this.objectEditorMenu.ResumeLayout(false);
this.objectEditorMenu.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.searchImgPB)).EndInit();
this.ResumeLayout(false);
}
@ -242,5 +254,6 @@
private STContextMenuStrip treeNodeContextMenu;
private STToolStrip stToolStrip1;
private System.Windows.Forms.ToolStripButton searchFormToolStrip;
private System.Windows.Forms.ToolStripButton toolStripButton1;
}
}

View File

@ -457,7 +457,15 @@ namespace Toolbox.Library.Forms
TreeViewExtensions.HideCheckBox(e.Node);
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
private void openToolStripMenuItem_Click(object sender, EventArgs e) {
AddNewFile();
}
private void toolStripButton1_Click(object sender, EventArgs e) {
AddNewFile();
}
private void AddNewFile()
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = Utils.GetAllFilters(FileManager.GetFileFormats());
@ -482,6 +490,10 @@ namespace Toolbox.Library.Forms
var node = (TreeNode)file;
AddNode(node);
}
else if (file is IArchiveFile)
{
AddIArchiveFile((IFileFormat)file);
}
else
{
STErrorDialog.Show("Invalid file type. Cannot add file to object list.", "Object List", "");
@ -583,5 +595,10 @@ namespace Toolbox.Library.Forms
searchForm = new SearchNodeForm(treeViewCustom1);
searchForm.Show(this);
}
private void treeViewCustom1_DoubleClick(object sender, MouseEventArgs e)
{
}
}
}

View File

@ -70,6 +70,16 @@ namespace Toolbox.Library.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap AddIcon {
get {
object obj = ResourceManager.GetObject("AddIcon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -145,6 +145,9 @@
<data name="InfoCheck" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\InfoCheck.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Save" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -154,9 +157,6 @@
<data name="RewindArrows2L" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Playback\RewindArrows2L.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="minimize1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="IconInt" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DataTyypes\IconInt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -199,6 +199,9 @@
<data name="arrowL" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\arrowL.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="IconCurve" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DataTyypes\IconCurve.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="minimize" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Forms\Toolbar\images\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -220,9 +223,6 @@
<data name="DefaultTexture" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DefaultTexture.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PauseBtn" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Playback\PauseBtn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="minimize_sele1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\minimize_sele.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -235,6 +235,9 @@
<data name="model" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\model.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="skeletonAnimation" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\skeletonAnimation.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="IconFloat" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DataTyypes\IconFloat.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -244,18 +247,15 @@
<data name="specularSDR" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Cubemaps\specularSDR.dds;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="InjectTexErrored" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\InjectTexErrored.dds;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="normalsSphere" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\normalsSphere.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FileBlank" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FileBank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="boneWeightGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\boneWeightGradient.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="arrowMinimize " type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\arrowMinimize .png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="IconList" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DataTyypes\IconList.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -316,8 +316,11 @@
<data name="LoadingImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingImage.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="IconCurve" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DataTyypes\IconCurve.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Antu_edit-find-mail1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Antu_edit-find-mail.svg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="InjectTexErrored" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\InjectTexErrored.dds;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Bnsh" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Bnsh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -349,8 +352,8 @@
<data name="materialSphereTransparent" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\materialSphereTransparent.tif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="skeletonAnimation" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\skeletonAnimation.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="arrowMinimize " type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\arrowMinimize .png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="UVPattern" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\UVPattern.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -361,8 +364,8 @@
<data name="ResetArrowR" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Playback\ResetArrowR.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FileBlank" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FileBank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="PauseBtn" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Playback\PauseBtn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Hovered" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CheckBox\Hovered.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -376,10 +379,10 @@
<data name="maximize" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Forms\Toolbar\images\maximize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="minimize1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Antu_edit-find-mail1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Antu_edit-find-mail.svg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="AddIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AddIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -1245,6 +1245,9 @@
<ItemGroup>
<None Include="Resources\MetaInfo.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AddIcon.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>