Some cleanup and remove gl shader logs notifcations

This commit is contained in:
KillzXGaming 2019-08-26 16:46:41 -04:00
parent 445bbe9f07
commit 4c49056b81
43 changed files with 622 additions and 5075 deletions

View file

@ -198,9 +198,6 @@ namespace FirstPlugin
fileEntry.FileName = GetString(hashes[i], fileEntry.FileData);
files.Add(fileEntry);
}
reader.Close();
reader.Dispose();
}
private string GetString(ulong Hash, byte[] Data)

View file

@ -137,9 +137,6 @@ namespace FirstPlugin
}
sarcData.Files.Clear();
// stream.Close();
// stream.Dispose();
}
public bool AddFile(ArchiveFileInfo archiveFileInfo)
@ -205,13 +202,12 @@ namespace FirstPlugin
public Syroot.BinaryData.ByteOrder GetByteOrder(System.IO.Stream data)
{
using (FileReader reader = new FileReader(data))
using (FileReader reader = new FileReader(data, true))
{
reader.ByteOrder = Syroot.BinaryData.ByteOrder.BigEndian;
reader.Seek(6);
ushort bom = reader.ReadUInt16();
reader.Close();
reader.Dispose();
reader.Position = 0;
if (bom == 0xFFFE)
return Syroot.BinaryData.ByteOrder.LittleEndian;

View file

@ -153,7 +153,6 @@ namespace FirstPlugin
$" This will be filtered out to prevent slow booting. {ExtsToString(FilteredExtensions.ToArray())}");
}
//Remove unused data
reader.Dispose();
startId = null;
FilteredExtensions.Clear();
Extensions.Clear();

View file

@ -79,9 +79,6 @@ namespace FirstPlugin
var info = new FileInfo(reader);
files.Add(info);
}
reader.Close();
reader.Dispose();
}
}

View file

@ -0,0 +1,126 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using Toolbox.Library.IO;
using Syroot.BinaryData;
namespace AudioLibrary
{
public static class AudioHelperExtension
{
public static T ReadReference<T>(this FileReader reader, long startOffset) where T : IAudioData, new()
{
var reference = reader.ReadStruct<SectionReference>();
reader.SeekBegin(startOffset + reference.Offset);
return CreateInstance<T>(reader);
}
private static T CreateInstance<T>(FileReader reader)
where T : IAudioData, new()
{
long pos = reader.Position;
T instance = new T();
instance.Read(reader);
reader.SeekBegin(pos);
return instance;
}
}
public interface IAudioData
{
void Read(FileReader reader);
void Write(FileWriter writer);
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class AudioHeader
{
public Magic Magic;
public ushort ByteOrder;
public ushort HeaderSize;
public uint Version;
public uint FileSize;
public ushort BlockCount;
public ushort padding;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class BlockReference
{
public AudioBlockType Type;
public ushort padding;
public uint Offset;
public uint Size;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class SectionReference
{
public AudioBlockType Type;
public ushort padding;
public uint Offset;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class ItemID
{
public AudioFileType TypeID;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
public byte[] FileIndex;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class WaveFileID
{
public ItemID ArchiveID;
public uint WavFileIndex;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class ADSHRCurve
{
public byte Attack;
public byte Decay;
public byte Sustain;
public byte Hold;
public byte Release;
}
//Enum list from vgmstream
public enum AudioBlockType : ushort
{
ByteTableType = 0x0100,
ReferenceTableType = 0x0101,
DspAdpcmInfoType = 0x0300,
ImaAdpcmInfoType = 0x0301,
SampleDataType = 0x1f00,
InfoBlockType = 0x4000,
SeekBlockType = 0x4001,
DataBlockType = 0x4002,
RegionBlockType = 0x4003,
PrefetchDataBlockType = 0x4004,
StreamInfoType = 0x4100,
TrackInfoType = 0x4101,
ChannelInfoType = 0x4102,
WavInfoBlockType = 0x7000,
WavDataBlockType = 0x7001,
WavChannelInfoType = 0x7100,
InfoBlockType2 = 0x7800,
}
public enum AudioFileType : byte
{
Sound,
SoundGroup,
Bank,
WaveArchive,
Group,
}
}

View file

@ -4,10 +4,13 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Toolbox.Library;
using System.Runtime.InteropServices;
using Toolbox.Library.IO;
using AudioLibrary;
namespace FirstPlugin
{
public class BFGRP : IFileFormat
public class BFGRP : IArchiveFile, IFileFormat
{
public FileType FileType { get; set; } = FileType.Audio;
@ -18,6 +21,11 @@ namespace FirstPlugin
public string FilePath { get; set; }
public IFileInfo IFileInfo { get; set; }
public bool CanAddFiles { get; set; }
public bool CanRenameFiles { get; set; }
public bool CanReplaceFiles { get; set; }
public bool CanDeleteFiles { get; set; }
public bool Identify(System.IO.Stream stream)
{
using (var reader = new Toolbox.Library.IO.FileReader(stream, true))
@ -35,9 +43,10 @@ namespace FirstPlugin
}
}
public void Load(System.IO.Stream stream)
{
}
public List<AudioEntry> files = new List<AudioEntry>();
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public void Unload()
{
@ -47,5 +56,140 @@ namespace FirstPlugin
public void Save(System.IO.Stream stream)
{
}
public bool AddFile(ArchiveFileInfo archiveFileInfo) {
return false;
}
public bool DeleteFile(ArchiveFileInfo archiveFileInfo) {
return false;
}
public void Load(System.IO.Stream stream)
{
using (var reader = new FileReader(stream))
{
reader.SetByteOrder(true);
var header = reader.ReadStruct<AudioHeader>();
Console.WriteLine($"Magic " + header.Magic);
Console.WriteLine($"HeaderSize " + header.HeaderSize);
Console.WriteLine($"Version " + header.Version);
Console.WriteLine($"BlockCount " + header.BlockCount);
Console.WriteLine($"ByteOrder " + header.ByteOrder);
var blocks = reader.ReadMultipleStructs<BlockReference>(header.BlockCount);
for (int i = 0; i < blocks.Count; i++)
{
Console.WriteLine($"Offset " + blocks[i].Offset);
reader.SeekBegin(blocks[i].Offset);
switch (blocks[i].Type)
{
case AudioBlockType.InfoBlockType:
ParseInfoBlock(reader);
break;
case AudioBlockType.InfoBlockType2:
ParseInfoBlock(reader);
break;
}
}
}
}
private void ParseInfoBlock(FileReader reader)
{
long basePos = reader.Position;
var infoBlock = reader.ReadStruct<InfoBlock>();
var references = reader.ReadMultipleStructs<SectionReference>(infoBlock.NumEntries);
for (int i = 0; i < infoBlock.NumEntries; i++)
{
reader.SeekBegin(basePos + (long)references[i].Offset + (i * 16));
LocationInfo info = new LocationInfo();
info.Read(reader);
files.Add(new AudioEntry()
{
FileName = $"File {i}",
FileData = info.FileData.Data,
});
}
}
public class AudioEntry : ArchiveFileInfo
{
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class InfoBlock
{
public Magic Magic = "INFO";
public uint BlockSize;
public uint NumEntries;
}
public class LocationInfo : IAudioData
{
public uint FileIndex;
public uint FileSize;
public FileInfo FileData;
public void Read(FileReader reader)
{
long basePos = reader.Position;
FileIndex = reader.ReadUInt32();
FileData = reader.ReadReference<FileInfo>(basePos);
FileSize = reader.ReadUInt32();
}
public void Write(FileWriter writer)
{
}
}
public class FileInfo : IAudioData
{
public byte[] Data;
public void Read(FileReader reader)
{
reader.ReadSignature(4,"FILE");
uint blockSize = reader.ReadUInt32();
Data = reader.ReadBytes((int)blockSize);
}
public void Write(FileWriter writer)
{
}
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class FileBlock
{
public Magic Magic = "FILE";
public uint BlockSize;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class InfoExBlock
{
public Magic Magic = "INFX";
public uint BlockSize;
public ulong DependencyInfoOffset;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class DependencyInfo
{
public uint ItemID;
public uint Flags;
}
}
}

View file

@ -110,9 +110,6 @@ namespace FirstPlugin
FILE.Read(reader, INFO);
}
}
reader.Close();
reader.Dispose();
}
public void Write(FileWriter writer)
{

View file

@ -189,11 +189,15 @@ namespace Bfres.Structs
public override void Replace(string FileName) {
uint swizzlePattern = 0;
if (texture != null)
swizzlePattern = (texture.Swizzle >> 8) & 7;
//If the mipcount is originally 1 it's probably important so set it as default
if (texture != null && texture.MipCount == 1)
ReplaceTexture(FileName, Format, texture.MipCount);
else
ReplaceTexture(FileName, Format, 0,0, null, false, false, false);
ReplaceTexture(FileName, Format, 0, swizzlePattern, null, false, false, false);
}
public void ReplaceTexture(string FileName, TEX_FORMAT DefaultFormat = TEX_FORMAT.UNKNOWN, uint MipMapCount = 0, uint swizzlePattern = 0, TEX_FORMAT[] SupportedFormats = null,
@ -460,6 +464,7 @@ namespace Bfres.Structs
texture.Format = ConvertToGx2Format(Format);
texture.Width = (uint)bitmap.Width;
texture.Height = (uint)bitmap.Height;
uint swizzle = (texture.Swizzle >> 8) & 7;
if (MipCount != 1)
{
@ -486,7 +491,7 @@ namespace Bfres.Structs
(uint)texture.Height,
(uint)texture.Depth,
(uint)texture.Format,
(uint)texture.Swizzle,
(uint)swizzle,
(uint)texture.Dim,
(uint)texture.MipCount
);

View file

@ -180,9 +180,6 @@ namespace FirstPlugin
IsDialog = IFileInfo != null && IFileInfo.InArchive;
data = ByamlFile.LoadN(stream);
stream.Dispose();
stream.Close();
}
public void Unload()
{

View file

@ -91,11 +91,6 @@ namespace FirstPlugin
header = new Header();
header.Read(reader, this);
}
reader.Close();
reader.Dispose();
stream.Close();
stream.Dispose();
}
ContextMenuStrip = new STContextMenuStrip();

View file

@ -82,9 +82,6 @@ namespace FirstPlugin
tex.Text = $"Texture{index++}";
textureFolder.Nodes.Add(tex);
}
reader.Dispose();
reader.Close();
}
public void Write(FileWriter writer, PTCL ptcl)
{

View file

@ -76,9 +76,6 @@ namespace FirstPlugin
tex.Text = $"Texture{index++}";
textureFolder.Nodes.Add(tex);
}
reader.Dispose();
reader.Close();
}
public void Write(FileWriter writer, PTCL ptcl)
{

View file

@ -243,12 +243,6 @@ namespace FirstPlugin
reader.SeekBegin(BlockStart + BlockSize);
}
reader.Close();
reader.Dispose();
}
internal int BlockCounter = 0;

View file

@ -48,10 +48,15 @@ namespace FirstPlugin
header = new Header();
header.Read(new FileReader(stream));
TreeNode clr1Node = new TreeNode("Colors");
TreeNode ati2Node = new TreeNode("Attributes");
TreeNode tgg2Node = new TreeNode("Tag Groups");
TreeNode syl3Node = new TreeNode("Styles");
TreeNode cti1Node = new TreeNode("Project Contents");
for (int i = 0; i < header.entries.Count; i++)
{
var node = new TreeNode(header.entries[i].Signature);
Nodes.Add(node);
if (header.entries[i] is CTI1)
{
@ -59,10 +64,18 @@ namespace FirstPlugin
for (int t = 0; t < cti1.TextEntries.Count; t++)
{
node.Nodes.Add(cti1.TextEntries[t]);
cti1Node.Nodes.Add(cti1.TextEntries[t]);
}
}
else
Nodes.Add(node);
}
if (clr1Node.Nodes.Count > 0) Nodes.Add(clr1Node);
if (ati2Node.Nodes.Count > 0) Nodes.Add(ati2Node);
if (tgg2Node.Nodes.Count > 0) Nodes.Add(tgg2Node);
if (syl3Node.Nodes.Count > 0) Nodes.Add(syl3Node);
if (cti1Node.Nodes.Count > 0) Nodes.Add(cti1Node);
}
public void Unload()
{
@ -98,6 +111,8 @@ namespace FirstPlugin
StringEncoding = (encoding == 0x01 ? Encoding.BigEndianUnicode : Encoding.UTF8);
for (int i = 0; i < SectionCount; i++)
{
long pos = reader.Position;

View file

@ -108,9 +108,6 @@ namespace FirstPlugin
ShaderVariations.Add(var);
node.Nodes.Add(var);
}
reader.Close();
reader.Dispose();
}
}
public class ShaderVariation : TreeNodeCustom

View file

@ -112,9 +112,6 @@ namespace FirstPlugin
source.Read(reader);
SourceDatas.Add(source);
}
reader.Close();
reader.Dispose();
}
public void Write(FileWriter reader)
{

View file

@ -161,9 +161,6 @@ namespace FirstPlugin
program.Read(reader);
ShaderPrograms.Add(program);
}
reader.Close();
reader.Dispose();
}
public void Write(FileWriter reader)
{

View file

@ -64,9 +64,6 @@ namespace FirstPlugin
program.Read(reader);
ShaderPrograms.Add(program);
}
reader.Close();
reader.Dispose();
}
}

View file

@ -391,8 +391,6 @@ namespace FirstPlugin
curTex++;
}
}
reader.Close();
reader.Dispose();
}
public class BlockDisplay : TreeNodeCustom

View file

@ -423,10 +423,6 @@ namespace FirstPlugin
}
reader.Seek(0, System.IO.SeekOrigin.Begin);
ImageData = reader.ReadBytes(imagesize);
reader.Dispose();
reader.Close();
reader = null;
}
public static NUTEXImageFormat ConvertGenericToNutFormat(TEX_FORMAT nutFormat)

View file

@ -207,9 +207,6 @@ namespace FirstPlugin
}
}
reader.Close();
reader.Dispose();
int curTex = 0;
foreach (var tex in TextureInfos) {

View file

@ -117,9 +117,6 @@ namespace FirstPlugin.Turbo
cameraData.BoundingWidth = reader.ReadSingle();
cameraData.BoundingHeight = reader.ReadSingle();
cameraData.Unk6 = reader.ReadByte();
reader.Close();
reader.Dispose();
}
public void Write(FileWriter writer)
{

View file

@ -208,6 +208,7 @@
<Compile Include="FileFormats\Archives\ARC.cs" />
<Compile Include="FileFormats\Archives\GFA.cs" />
<Compile Include="FileFormats\Archives\LM2\LM2_Material.cs" />
<Compile Include="FileFormats\Audio\Archives\AudioCommon.cs" />
<Compile Include="FileFormats\DKCTF\Common.cs" />
<Compile Include="FileFormats\DKCTF\MSBT.cs" />
<Compile Include="FileFormats\DKCTF\PAK.cs" />
@ -922,12 +923,6 @@
<Compile Include="GUI\Editors\MK8TrackEditor\MK8MapCameraEditor.Designer.cs">
<DependentUpon>MK8MapCameraEditor.cs</DependentUpon>
</Compile>
<Compile Include="GUI\Editors\PTCL\EmitterEditor.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="GUI\Editors\PTCL\EmitterEditor.Designer.cs">
<DependentUpon>EmitterEditor.cs</DependentUpon>
</Compile>
<Compile Include="GUI\BFRES\BfresModelImportSettings.cs">
<SubType>Form</SubType>
</Compile>
@ -1260,9 +1255,6 @@
<EmbeddedResource Include="GUI\Editors\PTCL\EmitterEditorNX.resx">
<DependentUpon>EmitterEditorNX.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\Editors\PTCL\EmitterEditor.resx">
<DependentUpon>EmitterEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\BFRES\BfresModelImportSettings.resx">
<DependentUpon>BfresModelImportSettings.cs</DependentUpon>
</EmbeddedResource>

View file

@ -1,641 +0,0 @@
namespace FirstPlugin
{
partial class EmitterEditor
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EmitterEditor));
this.stLabel1 = new Toolbox.Library.Forms.STLabel();
this.stLabel2 = new Toolbox.Library.Forms.STLabel();
this.color1Index0 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color0Index0 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color0Index1 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color1Index1 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color0Index3 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color1Index3 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color0Index2 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color1Index2 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color0Index7 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color1Index7 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color0Index6 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color1Index6 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color0Index5 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color1Index5 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color0Index4 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color1Index4 = new Toolbox.Library.Forms.ColorAlphaBox();
this.color0TB = new Toolbox.Library.Forms.STTextBox();
this.color0TB2 = new Toolbox.Library.Forms.STTextBox();
this.color0TB4 = new Toolbox.Library.Forms.STTextBox();
this.color0TB3 = new Toolbox.Library.Forms.STTextBox();
this.color0TB6 = new Toolbox.Library.Forms.STTextBox();
this.color0TB5 = new Toolbox.Library.Forms.STTextBox();
this.color0TB8 = new Toolbox.Library.Forms.STTextBox();
this.color0TB7 = new Toolbox.Library.Forms.STTextBox();
this.color1TB8 = new Toolbox.Library.Forms.STTextBox();
this.color1TB7 = new Toolbox.Library.Forms.STTextBox();
this.color1TB6 = new Toolbox.Library.Forms.STTextBox();
this.color1TB5 = new Toolbox.Library.Forms.STTextBox();
this.color1TB4 = new Toolbox.Library.Forms.STTextBox();
this.color1TB3 = new Toolbox.Library.Forms.STTextBox();
this.color1TB2 = new Toolbox.Library.Forms.STTextBox();
this.color1TB = new Toolbox.Library.Forms.STTextBox();
this.pictureBox2 = new Toolbox.Library.Forms.PictureBoxCustom();
this.pictureBox3 = new Toolbox.Library.Forms.PictureBoxCustom();
this.pictureBox1 = new Toolbox.Library.Forms.PictureBoxCustom();
this.stTabControl1 = new Toolbox.Library.Forms.STTabControl();
this.tabPageColors = new System.Windows.Forms.TabPage();
this.stPanel2 = new Toolbox.Library.Forms.STPanel();
this.tabPageTextures = new System.Windows.Forms.TabPage();
this.stPanel1 = new Toolbox.Library.Forms.STPanel();
this.TBTexture0 = new Toolbox.Library.Forms.STTextBox();
this.TBTexture2 = new Toolbox.Library.Forms.STTextBox();
this.TBTexture1 = new Toolbox.Library.Forms.STTextBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.stTabControl1.SuspendLayout();
this.tabPageColors.SuspendLayout();
this.stPanel2.SuspendLayout();
this.tabPageTextures.SuspendLayout();
this.stPanel1.SuspendLayout();
this.SuspendLayout();
//
// stLabel1
//
this.stLabel1.AutoSize = true;
this.stLabel1.Location = new System.Drawing.Point(3, 18);
this.stLabel1.Name = "stLabel1";
this.stLabel1.Size = new System.Drawing.Size(40, 13);
this.stLabel1.TabIndex = 0;
this.stLabel1.Text = "Color 0";
//
// stLabel2
//
this.stLabel2.AutoSize = true;
this.stLabel2.Location = new System.Drawing.Point(178, 18);
this.stLabel2.Name = "stLabel2";
this.stLabel2.Size = new System.Drawing.Size(40, 13);
this.stLabel2.TabIndex = 2;
this.stLabel2.Text = "Color 1";
//
// color1Index0
//
this.color1Index0.BackColor = System.Drawing.Color.Transparent;
this.color1Index0.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color1Index0.BackgroundImage")));
this.color1Index0.Color = System.Drawing.Color.Empty;
this.color1Index0.Location = new System.Drawing.Point(181, 46);
this.color1Index0.Name = "color1Index0";
this.color1Index0.Size = new System.Drawing.Size(50, 50);
this.color1Index0.TabIndex = 3;
this.color1Index0.Click += new System.EventHandler(this.color_Click);
//
// color0Index0
//
this.color0Index0.BackColor = System.Drawing.Color.Transparent;
this.color0Index0.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color0Index0.BackgroundImage")));
this.color0Index0.Color = System.Drawing.Color.Empty;
this.color0Index0.Location = new System.Drawing.Point(6, 46);
this.color0Index0.Name = "color0Index0";
this.color0Index0.Size = new System.Drawing.Size(50, 50);
this.color0Index0.TabIndex = 4;
this.color0Index0.Click += new System.EventHandler(this.color_Click);
//
// color0Index1
//
this.color0Index1.BackColor = System.Drawing.Color.Transparent;
this.color0Index1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color0Index1.BackgroundImage")));
this.color0Index1.Color = System.Drawing.Color.Empty;
this.color0Index1.Location = new System.Drawing.Point(6, 102);
this.color0Index1.Name = "color0Index1";
this.color0Index1.Size = new System.Drawing.Size(50, 50);
this.color0Index1.TabIndex = 6;
this.color0Index1.Click += new System.EventHandler(this.color_Click);
//
// color1Index1
//
this.color1Index1.BackColor = System.Drawing.Color.Transparent;
this.color1Index1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color1Index1.BackgroundImage")));
this.color1Index1.Color = System.Drawing.Color.Empty;
this.color1Index1.Location = new System.Drawing.Point(181, 102);
this.color1Index1.Name = "color1Index1";
this.color1Index1.Size = new System.Drawing.Size(50, 50);
this.color1Index1.TabIndex = 5;
this.color1Index1.Click += new System.EventHandler(this.color_Click);
//
// color0Index3
//
this.color0Index3.BackColor = System.Drawing.Color.Transparent;
this.color0Index3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color0Index3.BackgroundImage")));
this.color0Index3.Color = System.Drawing.Color.Empty;
this.color0Index3.Location = new System.Drawing.Point(6, 214);
this.color0Index3.Name = "color0Index3";
this.color0Index3.Size = new System.Drawing.Size(50, 50);
this.color0Index3.TabIndex = 10;
this.color0Index3.Click += new System.EventHandler(this.color_Click);
//
// color1Index3
//
this.color1Index3.BackColor = System.Drawing.Color.Transparent;
this.color1Index3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color1Index3.BackgroundImage")));
this.color1Index3.Color = System.Drawing.Color.Empty;
this.color1Index3.Location = new System.Drawing.Point(181, 214);
this.color1Index3.Name = "color1Index3";
this.color1Index3.Size = new System.Drawing.Size(50, 50);
this.color1Index3.TabIndex = 9;
this.color1Index3.Click += new System.EventHandler(this.color_Click);
//
// color0Index2
//
this.color0Index2.BackColor = System.Drawing.Color.Transparent;
this.color0Index2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color0Index2.BackgroundImage")));
this.color0Index2.Color = System.Drawing.Color.Empty;
this.color0Index2.Location = new System.Drawing.Point(6, 158);
this.color0Index2.Name = "color0Index2";
this.color0Index2.Size = new System.Drawing.Size(50, 50);
this.color0Index2.TabIndex = 8;
this.color0Index2.Click += new System.EventHandler(this.color_Click);
//
// color1Index2
//
this.color1Index2.BackColor = System.Drawing.Color.Transparent;
this.color1Index2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color1Index2.BackgroundImage")));
this.color1Index2.Color = System.Drawing.Color.Empty;
this.color1Index2.Location = new System.Drawing.Point(181, 158);
this.color1Index2.Name = "color1Index2";
this.color1Index2.Size = new System.Drawing.Size(50, 50);
this.color1Index2.TabIndex = 7;
this.color1Index2.Click += new System.EventHandler(this.color_Click);
//
// color0Index7
//
this.color0Index7.BackColor = System.Drawing.Color.Transparent;
this.color0Index7.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color0Index7.BackgroundImage")));
this.color0Index7.Color = System.Drawing.Color.Empty;
this.color0Index7.Location = new System.Drawing.Point(6, 438);
this.color0Index7.Name = "color0Index7";
this.color0Index7.Size = new System.Drawing.Size(50, 50);
this.color0Index7.TabIndex = 18;
this.color0Index7.Click += new System.EventHandler(this.color_Click);
//
// color1Index7
//
this.color1Index7.BackColor = System.Drawing.Color.Transparent;
this.color1Index7.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color1Index7.BackgroundImage")));
this.color1Index7.Color = System.Drawing.Color.Empty;
this.color1Index7.Location = new System.Drawing.Point(181, 438);
this.color1Index7.Name = "color1Index7";
this.color1Index7.Size = new System.Drawing.Size(50, 50);
this.color1Index7.TabIndex = 17;
this.color1Index7.Click += new System.EventHandler(this.color_Click);
//
// color0Index6
//
this.color0Index6.BackColor = System.Drawing.Color.Transparent;
this.color0Index6.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color0Index6.BackgroundImage")));
this.color0Index6.Color = System.Drawing.Color.Empty;
this.color0Index6.Location = new System.Drawing.Point(6, 382);
this.color0Index6.Name = "color0Index6";
this.color0Index6.Size = new System.Drawing.Size(50, 50);
this.color0Index6.TabIndex = 16;
this.color0Index6.Click += new System.EventHandler(this.color_Click);
//
// color1Index6
//
this.color1Index6.BackColor = System.Drawing.Color.Transparent;
this.color1Index6.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color1Index6.BackgroundImage")));
this.color1Index6.Color = System.Drawing.Color.Empty;
this.color1Index6.Location = new System.Drawing.Point(181, 382);
this.color1Index6.Name = "color1Index6";
this.color1Index6.Size = new System.Drawing.Size(50, 50);
this.color1Index6.TabIndex = 15;
this.color1Index6.Click += new System.EventHandler(this.color_Click);
//
// color0Index5
//
this.color0Index5.BackColor = System.Drawing.Color.Transparent;
this.color0Index5.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color0Index5.BackgroundImage")));
this.color0Index5.Color = System.Drawing.Color.Empty;
this.color0Index5.Location = new System.Drawing.Point(6, 326);
this.color0Index5.Name = "color0Index5";
this.color0Index5.Size = new System.Drawing.Size(50, 50);
this.color0Index5.TabIndex = 14;
this.color0Index5.Click += new System.EventHandler(this.color_Click);
//
// color1Index5
//
this.color1Index5.BackColor = System.Drawing.Color.Transparent;
this.color1Index5.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color1Index5.BackgroundImage")));
this.color1Index5.Color = System.Drawing.Color.Empty;
this.color1Index5.Location = new System.Drawing.Point(181, 326);
this.color1Index5.Name = "color1Index5";
this.color1Index5.Size = new System.Drawing.Size(50, 50);
this.color1Index5.TabIndex = 13;
this.color1Index5.Click += new System.EventHandler(this.color_Click);
//
// color0Index4
//
this.color0Index4.BackColor = System.Drawing.Color.Transparent;
this.color0Index4.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color0Index4.BackgroundImage")));
this.color0Index4.Color = System.Drawing.Color.Empty;
this.color0Index4.Location = new System.Drawing.Point(6, 270);
this.color0Index4.Name = "color0Index4";
this.color0Index4.Size = new System.Drawing.Size(50, 50);
this.color0Index4.TabIndex = 12;
this.color0Index4.Click += new System.EventHandler(this.color_Click);
//
// color1Index4
//
this.color1Index4.BackColor = System.Drawing.Color.Transparent;
this.color1Index4.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("color1Index4.BackgroundImage")));
this.color1Index4.Color = System.Drawing.Color.Empty;
this.color1Index4.Location = new System.Drawing.Point(181, 270);
this.color1Index4.Name = "color1Index4";
this.color1Index4.Size = new System.Drawing.Size(50, 50);
this.color1Index4.TabIndex = 11;
this.color1Index4.Click += new System.EventHandler(this.color_Click);
//
// color0TB
//
this.color0TB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color0TB.Location = new System.Drawing.Point(62, 62);
this.color0TB.Name = "color0TB";
this.color0TB.Size = new System.Drawing.Size(100, 20);
this.color0TB.TabIndex = 19;
this.color0TB.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color0TB2
//
this.color0TB2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color0TB2.Location = new System.Drawing.Point(62, 118);
this.color0TB2.Name = "color0TB2";
this.color0TB2.Size = new System.Drawing.Size(100, 20);
this.color0TB2.TabIndex = 20;
this.color0TB2.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color0TB4
//
this.color0TB4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color0TB4.Location = new System.Drawing.Point(62, 230);
this.color0TB4.Name = "color0TB4";
this.color0TB4.Size = new System.Drawing.Size(100, 20);
this.color0TB4.TabIndex = 22;
this.color0TB4.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color0TB3
//
this.color0TB3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color0TB3.Location = new System.Drawing.Point(62, 174);
this.color0TB3.Name = "color0TB3";
this.color0TB3.Size = new System.Drawing.Size(100, 20);
this.color0TB3.TabIndex = 21;
this.color0TB3.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color0TB6
//
this.color0TB6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color0TB6.Location = new System.Drawing.Point(62, 342);
this.color0TB6.Name = "color0TB6";
this.color0TB6.Size = new System.Drawing.Size(100, 20);
this.color0TB6.TabIndex = 24;
this.color0TB6.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color0TB5
//
this.color0TB5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color0TB5.Location = new System.Drawing.Point(62, 286);
this.color0TB5.Name = "color0TB5";
this.color0TB5.Size = new System.Drawing.Size(100, 20);
this.color0TB5.TabIndex = 23;
this.color0TB5.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color0TB8
//
this.color0TB8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color0TB8.Location = new System.Drawing.Point(62, 454);
this.color0TB8.Name = "color0TB8";
this.color0TB8.Size = new System.Drawing.Size(100, 20);
this.color0TB8.TabIndex = 26;
this.color0TB8.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color0TB7
//
this.color0TB7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color0TB7.Location = new System.Drawing.Point(62, 398);
this.color0TB7.Name = "color0TB7";
this.color0TB7.Size = new System.Drawing.Size(100, 20);
this.color0TB7.TabIndex = 25;
this.color0TB7.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color1TB8
//
this.color1TB8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color1TB8.Location = new System.Drawing.Point(250, 454);
this.color1TB8.Name = "color1TB8";
this.color1TB8.Size = new System.Drawing.Size(100, 20);
this.color1TB8.TabIndex = 34;
this.color1TB8.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color1TB7
//
this.color1TB7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color1TB7.Location = new System.Drawing.Point(250, 398);
this.color1TB7.Name = "color1TB7";
this.color1TB7.Size = new System.Drawing.Size(100, 20);
this.color1TB7.TabIndex = 33;
this.color1TB7.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color1TB6
//
this.color1TB6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color1TB6.Location = new System.Drawing.Point(250, 342);
this.color1TB6.Name = "color1TB6";
this.color1TB6.Size = new System.Drawing.Size(100, 20);
this.color1TB6.TabIndex = 32;
this.color1TB6.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color1TB5
//
this.color1TB5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color1TB5.Location = new System.Drawing.Point(250, 286);
this.color1TB5.Name = "color1TB5";
this.color1TB5.Size = new System.Drawing.Size(100, 20);
this.color1TB5.TabIndex = 31;
this.color1TB5.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color1TB4
//
this.color1TB4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color1TB4.Location = new System.Drawing.Point(250, 230);
this.color1TB4.Name = "color1TB4";
this.color1TB4.Size = new System.Drawing.Size(100, 20);
this.color1TB4.TabIndex = 30;
this.color1TB4.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color1TB3
//
this.color1TB3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color1TB3.Location = new System.Drawing.Point(250, 174);
this.color1TB3.Name = "color1TB3";
this.color1TB3.Size = new System.Drawing.Size(100, 20);
this.color1TB3.TabIndex = 29;
this.color1TB3.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color1TB2
//
this.color1TB2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color1TB2.Location = new System.Drawing.Point(250, 118);
this.color1TB2.Name = "color1TB2";
this.color1TB2.Size = new System.Drawing.Size(100, 20);
this.color1TB2.TabIndex = 28;
this.color1TB2.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// color1TB
//
this.color1TB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.color1TB.Location = new System.Drawing.Point(250, 62);
this.color1TB.Name = "color1TB";
this.color1TB.Size = new System.Drawing.Size(100, 20);
this.color1TB.TabIndex = 27;
this.color1TB.TextChanged += new System.EventHandler(this.hexTB_TextChanged);
//
// pictureBox2
//
this.pictureBox2.BackColor = System.Drawing.Color.Transparent;
this.pictureBox2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox2.BackgroundImage")));
this.pictureBox2.Location = new System.Drawing.Point(14, 192);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(150, 134);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox2.TabIndex = 36;
this.pictureBox2.TabStop = false;
//
// pictureBox3
//
this.pictureBox3.BackColor = System.Drawing.Color.Transparent;
this.pictureBox3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox3.BackgroundImage")));
this.pictureBox3.Location = new System.Drawing.Point(14, 361);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(150, 134);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox3.TabIndex = 37;
this.pictureBox3.TabStop = false;
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
this.pictureBox1.Location = new System.Drawing.Point(14, 41);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(150, 120);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// stTabControl1
//
this.stTabControl1.Controls.Add(this.tabPageColors);
this.stTabControl1.Controls.Add(this.tabPageTextures);
this.stTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.stTabControl1.Location = new System.Drawing.Point(0, 0);
this.stTabControl1.myBackColor = System.Drawing.Color.Empty;
this.stTabControl1.Name = "stTabControl1";
this.stTabControl1.SelectedIndex = 0;
this.stTabControl1.Size = new System.Drawing.Size(489, 561);
this.stTabControl1.TabIndex = 38;
//
// tabPageColors
//
this.tabPageColors.Controls.Add(this.stPanel2);
this.tabPageColors.Location = new System.Drawing.Point(4, 25);
this.tabPageColors.Name = "tabPageColors";
this.tabPageColors.Padding = new System.Windows.Forms.Padding(3);
this.tabPageColors.Size = new System.Drawing.Size(481, 532);
this.tabPageColors.TabIndex = 0;
this.tabPageColors.Text = "Colors";
this.tabPageColors.UseVisualStyleBackColor = true;
//
// stPanel2
//
this.stPanel2.Controls.Add(this.color1TB8);
this.stPanel2.Controls.Add(this.stLabel1);
this.stPanel2.Controls.Add(this.color0TB6);
this.stPanel2.Controls.Add(this.color1TB7);
this.stPanel2.Controls.Add(this.color0Index2);
this.stPanel2.Controls.Add(this.color1Index3);
this.stPanel2.Controls.Add(this.color1TB6);
this.stPanel2.Controls.Add(this.color0TB7);
this.stPanel2.Controls.Add(this.color0Index6);
this.stPanel2.Controls.Add(this.color0TB5);
this.stPanel2.Controls.Add(this.color1Index7);
this.stPanel2.Controls.Add(this.color1Index2);
this.stPanel2.Controls.Add(this.color1TB5);
this.stPanel2.Controls.Add(this.color0Index3);
this.stPanel2.Controls.Add(this.color1Index6);
this.stPanel2.Controls.Add(this.color0TB8);
this.stPanel2.Controls.Add(this.stLabel2);
this.stPanel2.Controls.Add(this.color0TB4);
this.stPanel2.Controls.Add(this.color0Index7);
this.stPanel2.Controls.Add(this.color0Index1);
this.stPanel2.Controls.Add(this.color1TB4);
this.stPanel2.Controls.Add(this.color1Index4);
this.stPanel2.Controls.Add(this.color0Index5);
this.stPanel2.Controls.Add(this.color1TB);
this.stPanel2.Controls.Add(this.color1Index0);
this.stPanel2.Controls.Add(this.color0TB3);
this.stPanel2.Controls.Add(this.color0TB);
this.stPanel2.Controls.Add(this.color1Index1);
this.stPanel2.Controls.Add(this.color1TB3);
this.stPanel2.Controls.Add(this.color0Index4);
this.stPanel2.Controls.Add(this.color1Index5);
this.stPanel2.Controls.Add(this.color1TB2);
this.stPanel2.Controls.Add(this.color0Index0);
this.stPanel2.Controls.Add(this.color0TB2);
this.stPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.stPanel2.Location = new System.Drawing.Point(3, 3);
this.stPanel2.Name = "stPanel2";
this.stPanel2.Size = new System.Drawing.Size(475, 526);
this.stPanel2.TabIndex = 0;
//
// tabPageTextures
//
this.tabPageTextures.Controls.Add(this.stPanel1);
this.tabPageTextures.Location = new System.Drawing.Point(4, 25);
this.tabPageTextures.Name = "tabPageTextures";
this.tabPageTextures.Padding = new System.Windows.Forms.Padding(3);
this.tabPageTextures.Size = new System.Drawing.Size(481, 532);
this.tabPageTextures.TabIndex = 1;
this.tabPageTextures.Text = "Textures";
this.tabPageTextures.UseVisualStyleBackColor = true;
//
// stPanel1
//
this.stPanel1.Controls.Add(this.TBTexture0);
this.stPanel1.Controls.Add(this.TBTexture2);
this.stPanel1.Controls.Add(this.pictureBox3);
this.stPanel1.Controls.Add(this.TBTexture1);
this.stPanel1.Controls.Add(this.pictureBox2);
this.stPanel1.Controls.Add(this.pictureBox1);
this.stPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.stPanel1.Location = new System.Drawing.Point(3, 3);
this.stPanel1.Name = "stPanel1";
this.stPanel1.Size = new System.Drawing.Size(475, 526);
this.stPanel1.TabIndex = 41;
//
// TBTexture0
//
this.TBTexture0.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TBTexture0.Location = new System.Drawing.Point(14, 15);
this.TBTexture0.Name = "TBTexture0";
this.TBTexture0.Size = new System.Drawing.Size(150, 20);
this.TBTexture0.TabIndex = 38;
//
// TBTexture2
//
this.TBTexture2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TBTexture2.Location = new System.Drawing.Point(14, 335);
this.TBTexture2.Name = "TBTexture2";
this.TBTexture2.Size = new System.Drawing.Size(150, 20);
this.TBTexture2.TabIndex = 40;
//
// TBTexture1
//
this.TBTexture1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TBTexture1.Location = new System.Drawing.Point(14, 166);
this.TBTexture1.Name = "TBTexture1";
this.TBTexture1.Size = new System.Drawing.Size(150, 20);
this.TBTexture1.TabIndex = 39;
//
// EmitterEditor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.stTabControl1);
this.Name = "EmitterEditor";
this.Size = new System.Drawing.Size(489, 561);
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.stTabControl1.ResumeLayout(false);
this.tabPageColors.ResumeLayout(false);
this.stPanel2.ResumeLayout(false);
this.stPanel2.PerformLayout();
this.tabPageTextures.ResumeLayout(false);
this.stPanel1.ResumeLayout(false);
this.stPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private Toolbox.Library.Forms.STLabel stLabel1;
private Toolbox.Library.Forms.STLabel stLabel2;
private Toolbox.Library.Forms.ColorAlphaBox color1Index0;
private Toolbox.Library.Forms.ColorAlphaBox color0Index0;
private Toolbox.Library.Forms.ColorAlphaBox color0Index1;
private Toolbox.Library.Forms.ColorAlphaBox color1Index1;
private Toolbox.Library.Forms.ColorAlphaBox color0Index3;
private Toolbox.Library.Forms.ColorAlphaBox color1Index3;
private Toolbox.Library.Forms.ColorAlphaBox color0Index2;
private Toolbox.Library.Forms.ColorAlphaBox color1Index2;
private Toolbox.Library.Forms.ColorAlphaBox color0Index7;
private Toolbox.Library.Forms.ColorAlphaBox color1Index7;
private Toolbox.Library.Forms.ColorAlphaBox color0Index6;
private Toolbox.Library.Forms.ColorAlphaBox color1Index6;
private Toolbox.Library.Forms.ColorAlphaBox color0Index5;
private Toolbox.Library.Forms.ColorAlphaBox color1Index5;
private Toolbox.Library.Forms.ColorAlphaBox color0Index4;
private Toolbox.Library.Forms.ColorAlphaBox color1Index4;
private Toolbox.Library.Forms.STTextBox color0TB;
private Toolbox.Library.Forms.STTextBox color0TB2;
private Toolbox.Library.Forms.STTextBox color0TB4;
private Toolbox.Library.Forms.STTextBox color0TB3;
private Toolbox.Library.Forms.STTextBox color0TB6;
private Toolbox.Library.Forms.STTextBox color0TB5;
private Toolbox.Library.Forms.STTextBox color0TB8;
private Toolbox.Library.Forms.STTextBox color0TB7;
private Toolbox.Library.Forms.STTextBox color1TB8;
private Toolbox.Library.Forms.STTextBox color1TB7;
private Toolbox.Library.Forms.STTextBox color1TB6;
private Toolbox.Library.Forms.STTextBox color1TB5;
private Toolbox.Library.Forms.STTextBox color1TB4;
private Toolbox.Library.Forms.STTextBox color1TB3;
private Toolbox.Library.Forms.STTextBox color1TB2;
private Toolbox.Library.Forms.STTextBox color1TB;
private Toolbox.Library.Forms.PictureBoxCustom pictureBox2;
private Toolbox.Library.Forms.PictureBoxCustom pictureBox3;
private Toolbox.Library.Forms.PictureBoxCustom pictureBox1;
private Toolbox.Library.Forms.STTabControl stTabControl1;
private System.Windows.Forms.TabPage tabPageColors;
private System.Windows.Forms.TabPage tabPageTextures;
private Toolbox.Library.Forms.STTextBox TBTexture2;
private Toolbox.Library.Forms.STTextBox TBTexture1;
private Toolbox.Library.Forms.STTextBox TBTexture0;
private Toolbox.Library.Forms.STPanel stPanel2;
private Toolbox.Library.Forms.STPanel stPanel1;
}
}

View file

@ -1,263 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using Toolbox.Library.Forms;
using Toolbox.Library;
namespace FirstPlugin
{
public partial class EmitterEditor : STUserControl
{
public EmitterEditor()
{
InitializeComponent();
stTabControl1.myBackColor = FormThemes.BaseTheme.FormBackColor;
tabPageColors.BackColor = FormThemes.BaseTheme.TabPageActive;
}
private void Reset()
{
pictureBox1.Image = null;
pictureBox2.Image = null;
pictureBox3.Image = null;
TBTexture0.Text = "";
TBTexture1.Text = "";
TBTexture2.Text = "";
}
private Thread Thread;
PTCL.Emitter ActiveEmitter;
public void LoadEmitter(PTCL.Emitter Emitter)
{
ActiveEmitter = Emitter;
Reset();
LoadColors(Emitter);
if (Emitter.DrawableTex.Count <= 0)
return;
if (Emitter.DrawableTex[0].MipCount > 0)
{
pictureBox1.Image = Imaging.GetLoadingImage();
pictureBox1.Image = Emitter.DrawableTex[0].GetBitmap();
TBTexture0.Text = Emitter.DrawableTex[0].Text;
}
if (Emitter.DrawableTex.Count < 2)
return;
if (Emitter.DrawableTex[1].MipCount > 0)
{
pictureBox2.Image = Imaging.GetLoadingImage();
pictureBox2.Image = Emitter.DrawableTex[1].GetBitmap();
TBTexture1.Text = Emitter.DrawableTex[1].Text;
}
if (Emitter.DrawableTex.Count < 3)
return;
if (Emitter.DrawableTex[2].MipCount > 0)
{
pictureBox3.Image = Imaging.GetLoadingImage();
pictureBox3.Image = Emitter.DrawableTex[2].GetBitmap();
TBTexture2.Text = Emitter.DrawableTex[2].Text;
}
Thread = new Thread((ThreadStart)(() =>
{
}));
try
{
/* Thread Thread2 = new Thread((ThreadStart)(() =>
{
pictureBox2.Image = Imaging.GetLoadingImage();
pictureBox2.Image = Emitter.DrawableTex[1].GetBitmap();
}));
Thread Thread3 = new Thread((ThreadStart)(() =>
{
pictureBox3.Image = Imaging.GetLoadingImage();
pictureBox3.Image = Emitter.DrawableTex[2].GetBitmap();
}));*/
}
catch
{
}
}
bool IsColorsLoaded = false;
public ColorAlphaBox GetColor(int colorType, int index)
{
foreach (Control control in stPanel2.Controls)
{
if (control.Name == $"color{colorType}Index{index}")
return (ColorAlphaBox)control;
}
return null;
}
public void RefreshColorBoxes()
{
foreach (Control control in stPanel2.Controls)
{
if (control is ColorAlphaBox)
control.Refresh();
}
}
private void LoadColors(PTCL.Emitter Emitter)
{
IsColorsLoaded = false;
for (int i = 0; i < 8; i++)
{
var colrBtn = GetColor(0, i);
colrBtn.Color = Emitter.Color0Array[i].Color;
}
for (int i = 0; i < 8; i++)
{
var colrBtn = GetColor(1, i);
colrBtn.Color = Emitter.Color1Array[i].Color;
}
RefreshColorBoxes();
color0TB.Text = Utils.ColorToHex(Emitter.Color0Array[0].Color);
color0TB2.Text = Utils.ColorToHex(Emitter.Color0Array[1].Color);
color0TB3.Text = Utils.ColorToHex(Emitter.Color0Array[2].Color);
color0TB4.Text = Utils.ColorToHex(Emitter.Color0Array[3].Color);
color0TB5.Text = Utils.ColorToHex(Emitter.Color0Array[4].Color);
color0TB6.Text = Utils.ColorToHex(Emitter.Color0Array[5].Color);
color0TB7.Text = Utils.ColorToHex(Emitter.Color0Array[6].Color);
color0TB8.Text = Utils.ColorToHex(Emitter.Color0Array[7].Color);
color1TB.Text = Utils.ColorToHex(Emitter.Color1Array[0].Color);
color1TB2.Text = Utils.ColorToHex(Emitter.Color1Array[1].Color);
color1TB3.Text = Utils.ColorToHex(Emitter.Color1Array[2].Color);
color1TB4.Text = Utils.ColorToHex(Emitter.Color1Array[3].Color);
color1TB5.Text = Utils.ColorToHex(Emitter.Color1Array[4].Color);
color1TB6.Text = Utils.ColorToHex(Emitter.Color1Array[5].Color);
color1TB7.Text = Utils.ColorToHex(Emitter.Color1Array[6].Color);
color1TB8.Text = Utils.ColorToHex(Emitter.Color1Array[7].Color);
IsColorsLoaded = true;
}
private void ExportImage0(object sender, EventArgs e)
{
ActiveEmitter.DrawableTex[0].ExportImage();
}
private void ReplaceImage0(object sender, EventArgs e)
{
if (ActiveEmitter is PTCL_WiiU.EmitterU)
{
var emitter = (PTCL_WiiU.EmitterU)ActiveEmitter;
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Supported Formats|*.dds; *.png;*.tga;*.jpg;*.tiff|" +
"Microsoft DDS |*.dds|" +
"Portable Network Graphics |*.png|" +
"Joint Photographic Experts Group |*.jpg|" +
"Bitmap Image |*.bmp|" +
"Tagged Image File Format |*.tiff|" +
"All files(*.*)|*.*";
ofd.Multiselect = false;
if (ofd.ShowDialog() == DialogResult.OK)
{
((PTCL_WiiU.TextureInfo)emitter.DrawableTex[0]).Replace(ofd.FileName);
}
}
}
private void color_Click(object sender, EventArgs e)
{
var button = sender as ColorAlphaBox;
if (button != null)
{
char LastChar = button.Name[button.Name.Length - 1];
int index = int.Parse(LastChar.ToString());
ColorDialog dialog = new ColorDialog();
if (dialog.ShowDialog() == DialogResult.OK)
{
Color output;
if (button.Name.Contains("color0"))
output = SetColor(ActiveEmitter.Color0Array[index].Color, dialog.Color);
else
output = SetColor(ActiveEmitter.Color1Array[index].Color, dialog.Color);
SetEmitterColor(output, index, button.Name.Contains("color0"));
button.Color = output;
RefreshColorBoxes();
}
}
}
private void SetEmitterColor(Color color, int index, bool IsColor0)
{
if (IsColor0)
ActiveEmitter.Color0Array[index].Color = color;
else
ActiveEmitter.Color1Array[index].Color = color;
}
public Color SetColor(Color input, Color output)
{
return Color.FromArgb(input.A, output.R, output.G, output.B);
}
private void hexTB_TextChanged(object sender, EventArgs e)
{
if (!IsColorsLoaded)
return;
if (sender is TextBox)
{
((TextBox)sender).MaxLength = 8;
if (((TextBox)sender).Text.Length != 8)
return;
Color[] colors0 = new Color[8];
Color[] colors1 = new Color[8];
ActiveEmitter.Color0Array[0].Color = Utils.HexToColor(color0TB.Text);
ActiveEmitter.Color0Array[1].Color = Utils.HexToColor(color0TB2.Text);
ActiveEmitter.Color0Array[2].Color = Utils.HexToColor(color0TB3.Text);
ActiveEmitter.Color0Array[3].Color = Utils.HexToColor(color0TB4.Text);
ActiveEmitter.Color0Array[4].Color = Utils.HexToColor(color0TB5.Text);
ActiveEmitter.Color0Array[5].Color = Utils.HexToColor(color0TB6.Text);
ActiveEmitter.Color0Array[6].Color = Utils.HexToColor(color0TB7.Text);
ActiveEmitter.Color0Array[7].Color = Utils.HexToColor(color0TB8.Text);
ActiveEmitter.Color1Array[0].Color = Utils.HexToColor(color1TB.Text);
ActiveEmitter.Color1Array[1].Color = Utils.HexToColor(color1TB2.Text);
ActiveEmitter.Color1Array[2].Color = Utils.HexToColor(color1TB3.Text);
ActiveEmitter.Color1Array[3].Color = Utils.HexToColor(color1TB4.Text);
ActiveEmitter.Color1Array[4].Color = Utils.HexToColor(color1TB5.Text);
ActiveEmitter.Color1Array[5].Color = Utils.HexToColor(color1TB6.Text);
ActiveEmitter.Color1Array[6].Color = Utils.HexToColor(color1TB7.Text);
ActiveEmitter.Color1Array[7].Color = Utils.HexToColor(color1TB8.Text);
LoadColors(ActiveEmitter);
}
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -378,6 +378,8 @@ namespace FirstPlugin
Formats.Add(typeof(CTR.NCCH.RomFS));
Formats.Add(typeof(DKCTF.MSBT));
Formats.Add(typeof(DKCTF.PAK));
// Formats.Add(typeof(MSBP));
// Formats.Add(typeof(BFGRP));
//Unfinished wip formats not ready for use
if (Runtime.DEVELOPER_DEBUG_MODE)
@ -388,7 +390,6 @@ namespace FirstPlugin
Formats.Add(typeof(BFSAR));
Formats.Add(typeof(GFA));
Formats.Add(typeof(HyruleWarriors.G1M.G1M));
Formats.Add(typeof(MSBP));
}

View file

@ -278,19 +278,19 @@ namespace Toolbox.Library.Animations
if (n.XSCA.HasAnimation())
{
file.WriteLine("anim scale.scaleX scaleX " + b.Text + " 0 0 " + (ac++) + ";");
writeKey(file, n.XSCA, n, a.Size(), "scaleX");
writeKey(file, n.XSCA, n, a.Size(), "scaleX", n.UseSegmentScaleCompensate);
file.WriteLine("}");
}
if (n.YSCA.HasAnimation())
{
file.WriteLine("anim scale.scaleY scaleY " + b.Text + " 0 0 " + (ac++) + ";");
writeKey(file, n.YSCA, n, a.Size(), "scaleY");
writeKey(file, n.YSCA, n, a.Size(), "scaleY", n.UseSegmentScaleCompensate);
file.WriteLine("}");
}
if (n.ZSCA.HasAnimation())
{
file.WriteLine("anim scale.scaleZ scaleZ " + b.Text + " 0 0 " + (ac++) + ";");
writeKey(file, n.ZSCA, n, a.Size(), "scaleZ");
writeKey(file, n.ZSCA, n, a.Size(), "scaleZ", n.UseSegmentScaleCompensate);
file.WriteLine("}");
}
@ -305,7 +305,7 @@ namespace Toolbox.Library.Animations
}
}
private static void writeKey(StreamWriter file, Animation.KeyGroup keys, Animation.KeyNode rt, int size, string type)
private static void writeKey(StreamWriter file, Animation.KeyGroup keys, Animation.KeyNode rt, int size, string type, bool useSegmentCompenseateScale = false)
{
bool isAngular = type == "rotateX" || type == "rotateY" || type == "rotateZ";
@ -328,15 +328,10 @@ namespace Toolbox.Library.Animations
{
float v = 0;
float scale = 1;
switch (type)
{
case "translateX":
v = key.Value;
break;
case "translateY":
v = key.Value;
break;
case "translateZ":
v = key.Value;
break;
@ -368,12 +363,11 @@ namespace Toolbox.Library.Animations
}
break;
case "scaleX":
v = key.Value;
break;
case "scaleY":
v = key.Value;
break;
case "scaleZ":
if (useSegmentCompenseateScale)
v = 1f / key.Value;
else
v = key.Value;
break;
}

View file

@ -0,0 +1,127 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
using Toolbox.Library.Forms;
using Toolbox.Library.IO;
namespace Toolbox.Library
{
public class ExplorerFile : TreeNodeCustom
{
private string filePath;
public ExplorerFile(string path)
{
filePath = path;
Text = Path.GetFileName(filePath);
ImageKey = "fileBlank";
SelectedImageKey = "fileBlank";
if (!CheckSupport())
{
ForeColor = FormThemes.BaseTheme.DisabledItemColor;
}
}
public override void OnClick(TreeView treeview)
{
return;
ArchiveFilePanel editor = (ArchiveFilePanel)LibraryGUI.GetActiveContent(typeof(ArchiveFilePanel));
if (editor == null)
{
editor = new ArchiveFilePanel();
editor.Dock = DockStyle.Fill;
LibraryGUI.LoadEditor(editor);
}
var info = new ArchiveFileInfo()
{
FileDataStream = new FileStream(filePath, FileMode.Open, FileAccess.Read),
FileName = Text,
};
editor.LoadFile(info);
editor.UpdateEditor();
}
private IFileFormat OpenFile()
{
return STFileLoader.OpenFileFormat(new FileStream(filePath, FileMode.Open, FileAccess.Read),
filePath, null, true);
}
public override void OnDoubleMouseClick(TreeView treeview)
{
IFileFormat file = OpenFile();
if (file == null) //Format not supported so return
return;
if (Utils.HasInterface(file.GetType(), typeof(IEditor<>)))
{
}
else if (file is IArchiveFile)
{
var FileRoot = new ArchiveRootNodeWrapper(file.FileName, (IArchiveFile)file);
FileRoot.FillTreeNodes();
if (file is TreeNode) //It can still be both, so add all it's nodes
{
foreach (TreeNode n in ((TreeNode)file).Nodes)
FileRoot.Nodes.Add(n);
}
ReplaceNode(this.Parent, this, FileRoot);
}
else if (file is TreeNode) {
ReplaceNode(this.Parent, this, (TreeNode)file);
}
}
private static void ReplaceNode(TreeNode parentNode, TreeNode replaceNode, TreeNode newNode)
{
if (newNode == null)
return;
int index = parentNode.Nodes.IndexOf(replaceNode);
parentNode.Nodes.RemoveAt(index);
parentNode.Nodes.Insert(index, newNode);
newNode.ImageKey = replaceNode.ImageKey;
newNode.SelectedImageKey = replaceNode.SelectedImageKey;
newNode.Text = replaceNode.Text;
if (newNode is ISingleTextureIconLoader)
{
ObjectEditor editor = LibraryGUI.GetObjectEditor();
if (editor != null) //The editor isn't always in object editor so check
editor.UpdateTextureIcon((ISingleTextureIconLoader)newNode);
}
}
private bool CheckSupport()
{
/* using (var fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
if (fileStream.Length < 10)
return false;
foreach (var format in FileManager.GetFileFormats())
{
format.FilePath = filePath;
format.FileName = Text;
if (format.Identify(fileStream))
return true;
}
}*/
return false;
}
}
}

View file

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Toolbox.Library
{
/// <summary>
/// Represents a folder system from the computer
/// </summary>
public class ExplorerFolder : TreeNodeCustom
{
private string _path;
private readonly bool CanExpand = true;
public ExplorerFolder(string path)
{
_path = path;
Text = Path.GetFileName(_path);
if (!DirectoryHelper.HasFolderPermission(_path))
{
ForeColor = System.Drawing.Color.DarkRed;
CanExpand = false;
}
else if (!DirectoryHelper.IsDirectoryEmpty(_path))
OnAfterCollapse();
ImageKey = "folder";
SelectedImageKey = "folder";
}
public void OnBeforeExpand()
{
if (IsExpanded || !CanExpand) return;
Nodes.Clear();
foreach (string str in Directory.GetDirectories($"{_path}\\"))
{
if (File.GetAttributes(str).HasFlag(FileAttributes.Directory))
Nodes.Add(new ExplorerFolder(str));
}
foreach (string str in Directory.GetFiles($"{_path}\\"))
{
if (!File.GetAttributes(str).HasFlag(FileAttributes.Directory))
Nodes.Add(new ExplorerFile(str));
}
}
public void OnAfterCollapse()
{
Nodes.Clear();
Nodes.Add(new TreeNode("0"));
}
}
}

View file

@ -113,6 +113,7 @@ namespace Toolbox.Library.Forms
Editor = ActiveEditor;
((TreeNodeFile)fileFormat).FillEditor(Editor);
return;
}
Type objectType = fileFormat.GetType();
@ -157,7 +158,9 @@ namespace Toolbox.Library.Forms
if (((IConvertableTextFormat)File).TextFileType == TextFileType.Yaml)
editor.IsYAML = true;
}
else
else if (ArchiveFileInfo.FileDataStream != null)
editor.FillEditor(ArchiveFileInfo.FileDataStream);
else if (ArchiveFileInfo.FileData != null)
editor.FillEditor(ArchiveFileInfo.FileData);
ArchiveFileInfo.FileFormat = File;

View file

@ -98,6 +98,7 @@
this.nodeSizeCB.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Solid;
this.nodeSizeCB.ButtonColor = System.Drawing.Color.Empty;
this.nodeSizeCB.FormattingEnabled = true;
this.nodeSizeCB.IsReadOnly = false;
this.nodeSizeCB.Location = new System.Drawing.Point(172, 29);
this.nodeSizeCB.Name = "nodeSizeCB";
this.nodeSizeCB.Size = new System.Drawing.Size(136, 21);
@ -144,6 +145,7 @@
this.treeViewCustom1.Size = new System.Drawing.Size(305, 485);
this.treeViewCustom1.TabIndex = 0;
this.treeViewCustom1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeViewCustom1_AfterCheck);
this.treeViewCustom1.AfterCollapse += new System.Windows.Forms.TreeViewEventHandler(this.treeViewCustom1_AfterCollapse);
this.treeViewCustom1.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeViewCustom1_BeforeExpand);
this.treeViewCustom1.DrawNode += new System.Windows.Forms.DrawTreeNodeEventHandler(this.treeViewCustom1_DrawNode);
this.treeViewCustom1.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.treeView_ItemDrag);

View file

@ -818,24 +818,47 @@ namespace Toolbox.Library.Forms
break;
}
treeViewCustom1.BeginUpdate();
treeViewCustom1.ItemHeight = Size;
treeViewCustom1.ReloadImages(Size, Size);
treeViewCustom1.ReloadTextureIcons(true);
treeViewCustom1.EndUpdate();
}
}
private void treeViewCustom1_BeforeExpand(object sender, TreeViewCancelEventArgs e)
{
if (e.Node != null && e.Node is ITextureIconLoader) {
if (e.Node == null) return;
else if (e.Node is ITextureIconLoader) {
treeViewCustom1.BeginUpdate();
LoadGenericTextureIcons((ITextureIconLoader)e.Node);
treeViewCustom1.EndUpdate();
}
if (e.Node != null && e.Node is ISingleTextureIconLoader) {
else if (e.Node is ISingleTextureIconLoader) {
LoadGenericTextureIcons((ISingleTextureIconLoader)e.Node);
}
if (e.Node != null && e.Node is ArchiveFolderNodeWrapper) {
else if (e.Node is ArchiveFolderNodeWrapper) {
LoadGenericTextureIcons(e.Node.Nodes);
}
else if (e.Node is ExplorerFolder)
{
treeViewCustom1.BeginUpdate();
((ExplorerFolder)e.Node).OnBeforeExpand();
treeViewCustom1.EndUpdate();
}
}
private void treeViewCustom1_AfterCollapse(object sender, TreeViewEventArgs e)
{
if (e.Node == null) return;
if (e.Node is ExplorerFolder)
{
treeViewCustom1.BeginUpdate();
((ExplorerFolder)e.Node).OnAfterCollapse();
treeViewCustom1.EndUpdate();
}
}
}
}

View file

@ -123,9 +123,6 @@
<metadata name="objectEditorMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="objectEditorMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="treeNodeContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>166, 17</value>
</metadata>

View file

@ -31,11 +31,12 @@
this.scintilla1 = new ScintillaNET.Scintilla();
this.stContextMenuStrip1 = new Toolbox.Library.Forms.STMenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.findToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.findAllResultsPanel1 = new ScintillaNET_FindReplaceDialog.FindAllResults.FindAllResultsPanel();
this.splitter1 = new System.Windows.Forms.Splitter();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.encodingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.stContextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
@ -59,7 +60,8 @@
//
this.stContextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.searchToolStripMenuItem});
this.searchToolStripMenuItem,
this.encodingToolStripMenuItem});
this.stContextMenuStrip1.Location = new System.Drawing.Point(0, 0);
this.stContextMenuStrip1.Name = "stContextMenuStrip1";
this.stContextMenuStrip1.Size = new System.Drawing.Size(800, 24);
@ -74,6 +76,13 @@
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "File";
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(98, 22);
this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
// searchToolStripMenuItem
//
this.searchToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -108,12 +117,11 @@
this.splitter1.TabIndex = 5;
this.splitter1.TabStop = false;
//
// saveToolStripMenuItem
// encodingToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
this.encodingToolStripMenuItem.Name = "encodingToolStripMenuItem";
this.encodingToolStripMenuItem.Size = new System.Drawing.Size(69, 20);
this.encodingToolStripMenuItem.Text = "Encoding";
//
// TextEditor
//
@ -142,5 +150,6 @@
private ScintillaNET_FindReplaceDialog.FindAllResults.FindAllResultsPanel findAllResultsPanel1;
private System.Windows.Forms.Splitter splitter1;
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem encodingToolStripMenuItem;
}
}

View file

@ -144,6 +144,8 @@ namespace Toolbox.Library.Forms
findAllResultsPanel1.ForeColor = FormThemes.BaseTheme.TextForeColor;
findAllResultsPanel1.Scintilla.SetWhitespaceBackColor(true, Color.FromArgb(50, 50, 50));
// foreach (var encoding in Encoding.GetEncodings())
// encodingToolStripMenuItem.DropDownItems.Add(encoding.DisplayName);
FillEditor("");
}
@ -155,6 +157,12 @@ namespace Toolbox.Library.Forms
return scintilla1.Text;
}
public void FillEditor(System.IO.Stream data)
{
using (var stringReader = new System.IO.StreamReader(data, true))
FillEditor(stringReader.ReadToEnd());
}
public void FillEditor(byte[] Data)
{
FillEditor(Encoding.Default.GetString(Data));

View file

@ -0,0 +1,33 @@
using System.Linq;
using System.IO;
using System.Security.AccessControl;
namespace Toolbox.Library
{
public class DirectoryHelper
{
public static bool IsDirectoryEmpty(string path)
{
if (!HasFolderPermission(path))
return false;
return !Directory.EnumerateFileSystemEntries(path).Any();
}
public static bool HasFolderPermission(string folderPath)
{
return true;
DirectoryInfo dirInfo = new DirectoryInfo(folderPath);
try
{
DirectorySecurity dirAC = dirInfo.GetAccessControl(AccessControlSections.All);
return true;
}
catch (PrivilegeNotHeldException)
{
return false;
}
}
}
}

View file

@ -82,12 +82,12 @@ namespace Toolbox.Library
if (FileDataStream != null)
{
return STFileLoader.OpenFileFormat(FileDataStream,
IOExtensions.RemoveIllegaleFolderNameCharacters(FileName), null, true);
IOExtensions.RemoveIllegaleFolderNameCharacters(FileName), null, true, true);
}
else
{
return STFileLoader.OpenFileFormat(
IOExtensions.RemoveIllegaleFolderNameCharacters(FileName), FileData, true);
IOExtensions.RemoveIllegaleFolderNameCharacters(FileName), FileData, false, true);
}
}

View file

@ -282,9 +282,12 @@
<Compile Include="Forms\SceneSelector.Designer.cs">
<DependentUpon>SceneSelector.cs</DependentUpon>
</Compile>
<Compile Include="FileSystem\ExplorerFile.cs" />
<Compile Include="FileSystem\ExplorerFolder.cs" />
<Compile Include="Generics\Texture\ImageParameters.cs" />
<Compile Include="Generics\Texture\STTextureFolder.cs" />
<Compile Include="Helpers\ArchiveNodeMenuHelper.cs" />
<Compile Include="Helpers\DirectoryHelper.cs" />
<Compile Include="Helpers\DragHelper.cs" />
<Compile Include="Interfaces\FileFormatting\ILeaveOpenOnLoad.cs" />
<Compile Include="Interfaces\FileFormatting\IPropertyContainer.cs" />

Binary file not shown.

Binary file not shown.

View file

@ -70,6 +70,7 @@
this.stToolStrip1 = new Toolbox.Library.Forms.STToolStrip();
this.saveToolStripButton = new System.Windows.Forms.ToolStripButton();
this.updateToolstrip = new System.Windows.Forms.ToolStripButton();
this.openFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.stPanel1.SuspendLayout();
this.tabControlContextMenuStrip.SuspendLayout();
@ -106,6 +107,7 @@
this.newToolStripMenuItem,
this.newFromFileToolStripMenuItem,
this.openToolStripMenuItem,
this.openFolderToolStripMenuItem,
this.recentToolStripMenuItem,
this.saveToolStripMenuItem,
this.saveAsToolStripMenuItem,
@ -117,33 +119,33 @@
// newToolStripMenuItem
//
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.newToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.newToolStripMenuItem.Text = "New";
//
// newFromFileToolStripMenuItem
//
this.newFromFileToolStripMenuItem.Name = "newFromFileToolStripMenuItem";
this.newFromFileToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.newFromFileToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.newFromFileToolStripMenuItem.Text = "New From File";
//
// openToolStripMenuItem
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.openToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.openToolStripMenuItem.Text = "Open";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
// recentToolStripMenuItem
//
this.recentToolStripMenuItem.Name = "recentToolStripMenuItem";
this.recentToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.recentToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.recentToolStripMenuItem.Text = "Recent";
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Enabled = false;
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.saveToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.saveToolStripMenuItem.Text = "Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
@ -151,14 +153,14 @@
//
this.saveAsToolStripMenuItem.Enabled = false;
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.saveAsToolStripMenuItem.Text = "Save As";
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(150, 22);
this.exitToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
@ -443,6 +445,13 @@
this.updateToolstrip.ToolTipText = "Update Tool";
this.updateToolstrip.Click += new System.EventHandler(this.updateToolstrip_Click);
//
// openFolderToolStripMenuItem
//
this.openFolderToolStripMenuItem.Name = "openFolderToolStripMenuItem";
this.openFolderToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.openFolderToolStripMenuItem.Text = "Open (Folder)";
this.openFolderToolStripMenuItem.Click += new System.EventHandler(this.openFolderToolStripMenuItem_Click);
//
// MainForm
//
this.AllowDrop = true;
@ -520,5 +529,6 @@
private System.Windows.Forms.ToolStripMenuItem requestFeatureToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem githubToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem tutorialToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openFolderToolStripMenuItem;
}
}

View file

@ -17,6 +17,7 @@ using System.Reflection;
using OpenTK.Graphics.OpenGL;
using Toolbox.Library.NodeWrappers;
using Toolbox.Library.Rendering;
using Toolbox.Library.Forms;
namespace Toolbox
{
@ -229,6 +230,19 @@ namespace Toolbox
OpenFileSelect();
}
private void openFolderToolStripMenuItem_Click(object sender, EventArgs e) {
FolderSelectDialog dlg = new FolderSelectDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
var root = new ExplorerFolder(dlg.SelectedPath);
ObjectEditor editor = new ObjectEditor();
editor.MdiParent = this;
editor.Text = CheckTabDupes(root.Text);
editor.AddNode(root);
editor.Show();
}
}
private void OpenFileSelect()
{
OpenFileDialog ofd = new OpenFileDialog();