示例#1
0
        void Section_Glass()
        {
            tools.StartChangeCheck();
            if (tools.ShowSection("Glass (" + manager.glass.Count + ")", ref manager.showGlass))
            {
                tools.GUI_List("Glass in Scene", ref manager.glass, ref manager.showGlassList, ref manager.scrollGlassList);

                /*
                 * tools.Label("The following list can also define the Render Order, where enabled. Lower = Earlier.", true);
                 * tools.StartChangeCheck();
                 * tools.BoolOption("Custom Render Order", ref manager.customRenderOrder);
                 * if(tools.EndChangeCheck())
                 * {
                 *      if(!manager.customRenderOrder)
                 *      {
                 *              manager.CustomRenderOrderDisabled();
                 *      }
                 * }
                 * tools.StartChangeCheck();
                 * int movedObjectCurrentIndex = -1;
                 * int movedObjectPreviousIndex = -1;
                 * tools.GUI_ReorderableList("Objects in Scene", ref manager.glass, ref manager.showGlassList, ref manager.scrollGlassList,
                 *                        ref movedObjectCurrentIndex, ref movedObjectPreviousIndex,
                 *                        "First", "Last");
                 * if(tools.EndChangeCheck())
                 * {
                 *      manager.UpdateGlassOrder_ByIndex(movedObjectCurrentIndex, movedObjectPreviousIndex);
                 * }
                 */

                if (tools.Button("Add from Scene (ignores duplicates)"))
                {
                    manager.FindGlass();
                }

                if (tools.ShowSection("Synchronised Settings", ref manager.showSynchroniseSettings))
                {
                    tools.StartEdit(manager, "Changed Glass Sync Settings");

                    tools.BoolOption("Synchronise Glass", ref manager.synchroniseGlass);
                    tools.Label("The following options define how Glass objects are synchronised.\nWhen a Glass object is modified its settings are copied to any matches.", true);
                    tools.BoolOption("Match by Glass Name", ref manager.matchByGlassName);
                    tools.BoolOption("Match by Materials", ref manager.matchByMaterial);

                    tools.FinishEdit(manager);

                    tools.EndSection();
                }
                tools.EndSection(true);
            }
            if (tools.EndChangeCheck())
            {
                manager.FindGlass();
            }
        }