mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-12-22 19:03:09 +00:00
51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using Switch_Toolbox.Library;
|
|
using Switch_Toolbox.Library.IO;
|
|
using Switch_Toolbox.Library.Rendering;
|
|
using Switch_Toolbox.Library.Forms;
|
|
using SuperBMDLib.Geometry;
|
|
|
|
namespace FirstPlugin
|
|
{
|
|
public class BMDShapeWrapper : GenericRenderedObject
|
|
{
|
|
SuperBMDLib.Model ParentModel;
|
|
Shape BMDShape;
|
|
|
|
private STGenericMaterial material;
|
|
public BMDShapeWrapper(Shape shape, SuperBMDLib.Model model, BMDMaterialWrapper mat)
|
|
{
|
|
BMDShape = shape;
|
|
ParentModel = model;
|
|
material = mat;
|
|
}
|
|
|
|
public override STGenericMaterial GetMaterial()
|
|
{
|
|
return material;
|
|
}
|
|
|
|
public void SetMaterial(STGenericMaterial mat)
|
|
{
|
|
material = mat;
|
|
}
|
|
|
|
public override void OnClick(TreeView treeView)
|
|
{
|
|
STPropertyGrid editor = (STPropertyGrid)LibraryGUI.GetActiveContent(typeof(STPropertyGrid));
|
|
if (editor == null)
|
|
{
|
|
editor = new STPropertyGrid();
|
|
LibraryGUI.LoadEditor(editor);
|
|
}
|
|
editor.Text = Text;
|
|
editor.Dock = DockStyle.Fill;
|
|
editor.LoadProperty(BMDShape, null);
|
|
}
|
|
}
|
|
}
|