From 3d69ad3fb70b635fecf118b7321ee366bc5d56f1 Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Sun, 20 Oct 2019 13:14:21 -0400 Subject: [PATCH] A few more fixes with adding bxlan groups --- .../FileFormats/Layout/Common.cs | 28 +++++++++++++++++++ .../Animations/Basic/AddGroupTypeDialog.cs | 25 ++++++++++++++--- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/File_Format_Library/FileFormats/Layout/Common.cs b/File_Format_Library/FileFormats/Layout/Common.cs index e5a538e6..b9a6ae9d 100644 --- a/File_Format_Library/FileFormats/Layout/Common.cs +++ b/File_Format_Library/FileFormats/Layout/Common.cs @@ -1494,6 +1494,34 @@ namespace LayoutBXLYT get { return TypeDefine.ContainsKey(Tag) ? TypeDefine[Tag] : Tag; } } + public static Dictionary CafeTypeDefine = new Dictionary() + { + {"FLPA","PaneSRT" }, + {"FLVI","Visibility" }, + {"FLTS","TextureSRT" }, + {"FLVC","VertexColor" }, + {"FLMC","MaterialColor" }, + {"FLTP","TexturePattern" }, + {"FLIM","IndTextureSRT" }, + {"FLAC","AlphaTest" }, + {"FLCT","FontShadow" }, + {"FLCC","PerCharacterTransformCurve" }, + }; + + public static Dictionary RevTypeDefine = new Dictionary() + { + {"RLPA","PaneSRT" }, + {"RLVI","Visibility" }, + {"RLTS","TextureSRT" }, + {"RLVC","VertexColor" }, + {"RLMC","MaterialColor" }, + {"RLTP","TexturePattern" }, + {"RLIM","IndTextureSRT" }, + {"RLAC","AlphaTest" }, + {"RLCT","FontShadow" }, + {"RLCC","PerCharacterTransformCurve" }, + }; + public static Dictionary TypeDefine = new Dictionary() { {"FLPA","PaneSRT" }, diff --git a/File_Format_Library/GUI/BFLYT/Animations/Basic/AddGroupTypeDialog.cs b/File_Format_Library/GUI/BFLYT/Animations/Basic/AddGroupTypeDialog.cs index b32bb0da..414034fb 100644 --- a/File_Format_Library/GUI/BFLYT/Animations/Basic/AddGroupTypeDialog.cs +++ b/File_Format_Library/GUI/BFLYT/Animations/Basic/AddGroupTypeDialog.cs @@ -21,10 +21,21 @@ namespace LayoutBXLYT CanResize = false; ActiveGroup = animGroup; - foreach (var tagDefine in BxlanPaiTag.TypeDefine) + if (animGroup.Target == AnimationTarget.Material) { - if (!animGroup.Tags.Any(x => x.Tag == tagDefine.Key )) - stComboBox1.Items.Add(tagDefine.Value); + stComboBox1.Items.Add("PaneSRT"); + stComboBox1.Items.Add("Visibility"); + stComboBox1.Items.Add("TextureSRT"); + stComboBox1.Items.Add("VertexColor"); + } + else + { + stComboBox1.Items.Add("MaterialColor"); + stComboBox1.Items.Add("TexturePattern"); + stComboBox1.Items.Add("IndTextureSRT"); + stComboBox1.Items.Add("AlphaTest"); + stComboBox1.Items.Add("FontShadow"); + stComboBox1.Items.Add("PerCharacterTransformCurve"); } stComboBox1.SelectedIndex = 0; @@ -32,7 +43,13 @@ namespace LayoutBXLYT public BxlanPaiTag AddEntry() { - var tagValue = BxlanPaiTag.TypeDefine.FirstOrDefault(x => x.Value == (string)stComboBox1.SelectedItem).Key; + string tagValue = ""; + + if (ActiveGroup is BFLAN.PaiEntry) + tagValue = BxlanPaiTag.CafeTypeDefine.FirstOrDefault(x => x.Value == (string)stComboBox1.SelectedItem).Key; + if (ActiveGroup is BRLAN.PaiEntry) + tagValue = BxlanPaiTag.RevTypeDefine.FirstOrDefault(x => x.Value == (string)stComboBox1.SelectedItem).Key; + return ActiveGroup.AddEntry(tagValue); } }