1
0
mirror of synced 2024-12-01 02:27:22 +01:00

Few more fixes. Editor should be fully functional

This commit is contained in:
KillzXGaming 2019-10-20 13:30:09 -04:00
parent 3d69ad3fb7
commit 880afd25d4
3 changed files with 18 additions and 2 deletions

View File

@ -1466,7 +1466,7 @@ namespace LayoutBXLYT
{
byte target = (byte)TargetType;
string tagType = Tag.Remove(0, 1);
switch (Tag)
switch (tagType)
{
case "LPA":
return new LPATagEntry(target, interpolationType);

View File

@ -21,7 +21,7 @@ namespace LayoutBXLYT
CanResize = false;
ActiveGroup = animGroup;
if (animGroup.Target == AnimationTarget.Material)
if (animGroup.Target == AnimationTarget.Pane)
{
stComboBox1.Items.Add("PaneSRT");
stComboBox1.Items.Add("Visibility");

View File

@ -135,6 +135,8 @@ namespace LayoutBXLYT
public class GroupAnimWrapper : TreeNode, IContextMenuNode
{
public BxlanPAI1 AnimInfo => (BxlanPAI1)Parent.Tag;
public BxlanPaiEntry PaiEntry => (BxlanPaiEntry)Tag;
public GroupAnimWrapper(string text) {
@ -145,10 +147,17 @@ namespace LayoutBXLYT
{
List<ToolStripItem> Items = new List<ToolStripItem>();
Items.Add(new ToolStripMenuItem("Add Animation Group", null, AddGroup, Keys.Control | Keys.A));
Items.Add(new ToolStripMenuItem("Remove Group", null, RemoveGroup, Keys.Delete));
Items.Add(new ToolStripMenuItem("Clear Groups", null, ClearGroups, Keys.Control | Keys.C));
return Items.ToArray();
}
private void RemoveGroup(object sender, EventArgs e)
{
AnimInfo.Entries.Remove(PaiEntry);
Parent.Nodes.Remove(this);
}
private void AddGroup(object sender, EventArgs e)
{
AddGroupTypeDialog dlg = new AddGroupTypeDialog(PaiEntry);
@ -181,10 +190,17 @@ namespace LayoutBXLYT
{
List<ToolStripItem> Items = new List<ToolStripItem>();
Items.Add(new ToolStripMenuItem("Add Target", null, AddTarget, Keys.Control | Keys.A));
Items.Add(new ToolStripMenuItem("Remove Group", null, RemoveGroup, Keys.Delete));
Items.Add(new ToolStripMenuItem("Clear Targets", null, ClearTargets, Keys.Control | Keys.C));
return Items.ToArray();
}
private void RemoveGroup(object sender, EventArgs e)
{
ParentPaiEntry.Tags.Remove(GroupTag);
Parent.Nodes.Remove(this);
}
private void AddTarget(object sender, EventArgs e)
{
AddGroupTargetDialog dlg = new AddGroupTargetDialog();