mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 20:43:09 +00:00
Load ptcl textures to editor when clicked
This commit is contained in:
parent
c34d021ddc
commit
93830c84e1
4 changed files with 27 additions and 0 deletions
Binary file not shown.
|
@ -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
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue