1
0
mirror of synced 2024-11-12 02:00:50 +01:00

Load ptcl textures to editor when clicked

This commit is contained in:
KillzXGaming 2019-03-29 18:07:51 -04:00
parent c34d021ddc
commit 93830c84e1
4 changed files with 27 additions and 0 deletions

Binary file not shown.

View File

@ -9,6 +9,7 @@ using Switch_Toolbox.Library;
using System.IO;
using Syroot.BinaryData;
using System.Windows.Forms;
using Switch_Toolbox.Library.Forms;
namespace FirstPlugin
{
@ -400,6 +401,32 @@ namespace FirstPlugin
}
public class TextureInfo : STGenericTexture
{
public TextureInfo()
{
ImageKey = "Texture";
SelectedImageKey = "Texture";
}
public override void OnClick(TreeView treeView)
{
UpdateEditor();
}
public void UpdateEditor()
{
ImageEditorBase editor = (ImageEditorBase)LibraryGUI.Instance.GetActiveContent(typeof(ImageEditorBase));
if (editor == null)
{
editor = new ImageEditorBase();
editor.Dock = DockStyle.Fill;
LibraryGUI.Instance.LoadEditor(editor);
}
editor.Text = Text;
editor.LoadProperties(GenericProperties);
editor.LoadImage(this);
}
public override TEX_FORMAT[] SupportedFormats
{
get