コード例 #1
0
        private ArrayList getCurrentData(string matName)
        {
            System.Collections.ArrayList data = new System.Collections.ArrayList();

            data.Clear();

            bool writeFallback = true;

            data.Add("Texture " + matName);

            foreach (object obj in mats)
            {
                if (obj.GetType() == typeof(aeCommon.MatBlock))
                {
                    aeCommon.MatBlock mb = (aeCommon.MatBlock)obj;

                    if (mb.isFallBack)
                    {
                        if (writeFallback)
                        {
                            writeFallback = false;
                            data.Add("\tFallback");
                            int useFallbackVal = this.useFallback ? 1 : 0;
                            data.Add(string.Format("\t\tUseFallback {0}", useFallbackVal));
                        }
                        mb.getData(ref data);
                    }
                    else
                    {
                        mb.getData(ref data);
                        data.Add("");
                    }
                }
                else if (obj.GetType() == typeof(FB_GlobalOptionsPnl))
                {
                    FB_GlobalOptionsPnl fbg = (FB_GlobalOptionsPnl)obj;
                    fbg.getData(ref data);
                }
                else if (obj.GetType() == typeof(aeCommon.MatSpecLitCubeMapTintFlags))
                {
                    aeCommon.MatSpecLitCubeMapTintFlags mslcmtf = (aeCommon.MatSpecLitCubeMapTintFlags)obj;
                    mslcmtf.getData(ref data);
                }
            }

            data.Add("\tEnd");

            data.Add("End");

            return(data);
        }
コード例 #2
0
        private void buildMatSec(string matSecName, string [] matFieldsList, bool isFallBackSec)
        {
            int mWidth  = 970,
                mHeight = 80;

            FB_GlobalOptionsPnl fb_gopt = null;

            System.Drawing.Size       gSize = new System.Drawing.Size(mWidth, mHeight);
            aeCommon.CollapsablePanel cp    = new aeCommon.CollapsablePanel(matSecName);

            populateMatPanel(matFieldsList, cp, mHeight, gSize, isFallBackSec);

            if (isFallBackSec)
            {
                CheckBox useFallbackChBx = new CheckBox();
                useFallbackChBx.AutoSize = true;
                useFallbackChBx.Location = new System.Drawing.Point(10, 0);
                useFallbackChBx.Name     = "useFallbackChBx";
                useFallbackChBx.Size     = new System.Drawing.Size(88, 17);
                useFallbackChBx.TabIndex = 0;
                useFallbackChBx.Text     = "Use Fallback";
                useFallbackChBx.UseVisualStyleBackColor = true;
                useFallbackChBx.Checked         = true;
                useFallbackChBx.CheckedChanged -= new EventHandler(useFallbackChBx_CheckedChanged);
                useFallbackChBx.CheckedChanged += new EventHandler(useFallbackChBx_CheckedChanged);
                cp.Add(useFallbackChBx);
                this.useFallback = true;

                fb_gopt = new FB_GlobalOptionsPnl();

                cp.Add(fb_gopt);

                cp.fixHeight();

                fb_gopt.Location = new Point(10, cp.Height - 150);
            }

            //populateMatPanel(matFieldsList, cp, mHeight, gSize, isFallBackSec);

            if (isFallBackSec)
            {
                this.mats.Add(fb_gopt);
            }
            this.matTrickPropertiesPanel.Controls.Add(cp);
        }