示例#1
0
        public static void FfxEditor()
        {
            ImGui.SetNextWindowDockID(mainViewPortDockSpaceID, ImGuiCond.FirstUseEver);
            if (SelectedFfxWindow.ShowFfxEditorProperties)
            {
                AxBySwapper();
                ImGui.NewLine();
                switch (SelectedFfxWindow.AxBy)
                {
                case "A0B0":
                    break;

                case "A16B4":
                    break;

                case "A19B7":
                    break;

                case "A32B8":
                    SelectedFfxWindow.FfxPropertyA32B8StaticScalar(SelectedFfxWindow.NodeListEditor);
                    break;

                case "A35B11":
                    SelectedFfxWindow.FfxPropertyA35B11StaticColor(SelectedFfxWindow.NodeListEditor);
                    break;

                case "A64B16":
                    SelectedFfxWindow.FfxPropertyA64B16ScalarInterpolationLinear(SelectedFfxWindow.NodeListEditor);
                    break;

                case "A67B19":
                    SelectedFfxWindow.FfxPropertyA67B19ColorInterpolationLinear(SelectedFfxWindow.NodeListEditor);
                    break;

                case "A96B24":
                    SelectedFfxWindow.FfxPropertyA96B24ScalarInterpolationWithCustomCurve(SelectedFfxWindow.NodeListEditor);
                    break;

                case "A99B27":
                    SelectedFfxWindow.FfxPropertyA99B27ColorInterpolationWithCustomCurve(SelectedFfxWindow.NodeListEditor);
                    break;

                case "A4163B35":
                    SelectedFfxWindow.FfxPropertyA67B19ColorInterpolationLinear(SelectedFfxWindow.NodeListEditor);
                    break;

                case "A4160B32":
                    SelectedFfxWindow.FfxPropertyA64B16ScalarInterpolationLinear(SelectedFfxWindow.NodeListEditor);
                    break;

                default:
                    ImGui.Text("ERROR: FFX Property Handler not found, using Default Handler.");
                    foreach (XElement node in SelectedFfxWindow.NodeListEditor)
                    {
                        string dataType  = node.Attribute(FfxHelperMethods.Xsi + "type").Value;
                        int    nodeIndex = FfxHelperMethods.GetNodeIndexinParent(node);
                        if (dataType == "FFXFieldFloat")
                        {
                            SelectedFfxWindow.FloatInputDefaultNode(node, dataType + "##" + nodeIndex.ToString());
                        }
                        else if (dataType == "FFXFieldInt")
                        {
                            SelectedFfxWindow.IntInputDefaultNode(node, dataType + "##" + nodeIndex.ToString());
                        }
                    }
                    break;
                }
            }
            else if (SelectedFfxWindow.ShowFfxEditorFields)
            {
                DefParser.DefXmlParser(SelectedFfxWindow.NodeListEditor, SelectedFfxWindow.Fields[1], SelectedFfxWindow.Fields[0]);
            }
        }