Example #1
0
        public static void GenerateTypeTree(TypeTreeContext context, string name)
        {
            GradientLayout layout = context.Layout.Serialized.Gradient;

            context.AddNode(layout.Name, name, layout.Version);
            context.BeginChildren();
            if (layout.Version == 1)
            {
                ColorRGBA32Layout.GenerateTypeTree(context, layout.Key0Name);
                ColorRGBA32Layout.GenerateTypeTree(context, layout.Key1Name);
                ColorRGBA32Layout.GenerateTypeTree(context, layout.Key2Name);
                ColorRGBA32Layout.GenerateTypeTree(context, layout.Key3Name);
                ColorRGBA32Layout.GenerateTypeTree(context, layout.Key4Name);
                ColorRGBA32Layout.GenerateTypeTree(context, layout.Key5Name);
                ColorRGBA32Layout.GenerateTypeTree(context, layout.Key6Name);
                ColorRGBA32Layout.GenerateTypeTree(context, layout.Key7Name);
            }
            else
            {
                ColorRGBAfLayout.GenerateTypeTree(context, layout.Key0Name);
                ColorRGBAfLayout.GenerateTypeTree(context, layout.Key1Name);
                ColorRGBAfLayout.GenerateTypeTree(context, layout.Key2Name);
                ColorRGBAfLayout.GenerateTypeTree(context, layout.Key3Name);
                ColorRGBAfLayout.GenerateTypeTree(context, layout.Key4Name);
                ColorRGBAfLayout.GenerateTypeTree(context, layout.Key5Name);
                ColorRGBAfLayout.GenerateTypeTree(context, layout.Key6Name);
                ColorRGBAfLayout.GenerateTypeTree(context, layout.Key7Name);
            }

            context.AddInt16(layout.Ctime0Name);
            context.AddInt16(layout.Ctime1Name);
            context.AddInt16(layout.Ctime2Name);
            context.AddInt16(layout.Ctime3Name);
            context.AddInt16(layout.Ctime4Name);
            context.AddInt16(layout.Ctime5Name);
            context.AddInt16(layout.Ctime6Name);
            context.AddInt16(layout.Ctime7Name);

            context.AddInt16(layout.Atime0Name);
            context.AddInt16(layout.Atime1Name);
            context.AddInt16(layout.Atime2Name);
            context.AddInt16(layout.Atime3Name);
            context.AddInt16(layout.Atime4Name);
            context.AddInt16(layout.Atime5Name);
            context.AddInt16(layout.Atime6Name);
            context.AddInt16(layout.Atime7Name);

            if (layout.HasMode)
            {
                context.AddInt32(layout.ModeName);
            }
            context.AddByte(layout.NumColorKeysName);
            context.AddByte(layout.NumAlphaKeysName);
            context.EndChildren();
        }
Example #2
0
        public static void GenerateTypeTree(TypeTreeContext context, string name)
        {
            ColorRGBAfLayout layout = context.Layout.Serialized.ColorRGBAf;

            context.AddNode(layout.Name, name);
            context.BeginChildren();
            context.AddSingle(layout.RName);
            context.AddSingle(layout.GName);
            context.AddSingle(layout.BName);
            context.AddSingle(layout.AName);
            context.EndChildren();
        }
        public static void GenerateTypeTree(TypeTreeContext context, string name)
        {
            GUIStyleStateLayout layout = context.Layout.Serialized.GUIStyle.GUIStyleState;

            context.AddNode(layout.Name, name);
            context.BeginChildren();
            context.AddPPtr(context.Layout.Texture2D.Name, layout.BackgroundName);
            if (layout.HasScaledBackgrounds)
            {
                context.AddArray(layout.ScaledBackgroundsName, (c, n) => PPtrLayout.GenerateTypeTree(c, c.Layout.Texture2D.Name, n));
            }
            ColorRGBAfLayout.GenerateTypeTree(context, layout.TextColorName);
            context.EndChildren();
        }