internal void SetupFloatSlider(ShaderPropFloat fprop, EditValue edit, Action <float> func)
 {
     SetupFloatSlider(fprop.name, edit, fprop.sliderMin, fprop.sliderMax, func, fprop.opts, null,
                      fprop.presetVals);
 }
        // Token: 0x06000347 RID: 839 RVA: 0x0001AD6C File Offset: 0x00018F6C
        public void Show(bool reload)
        {
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            try
            {
                //ACCMaterialsView.<>c__DisplayClass4 CS$<>8__locals1 = new ACCMaterialsView.<>c__DisplayClass4();
                GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                try
                {
                    GUIContent content = this.expand ? ACCMaterialsView.MinusIcon : ACCMaterialsView.PlusIcon;
                    if (GUILayout.Button(content, ACCMaterialsView.bStyleLeft, new GUILayoutOption[]
                    {
                        ACCMaterialsView.optUnitHeight,
                        ACCMaterialsView.optIconWidth
                    }))
                    {
                        this.expand = !this.expand;
                    }
                    if (GUILayout.Button(this.edited.name, ACCMaterialsView.bStyleLeft, new GUILayoutOption[]
                    {
                        ACCMaterialsView.optUnitHeight
                    }))
                    {
                        this.expand = !this.expand;
                    }
                    if (!this.expand)
                    {
                        return;
                    }
                }
                finally
                {
                    GUILayout.EndHorizontal();
                }
                if (this.edited.type == ShaderType.UNKNOWN)
                {
                    GUILayout.Label("shader: " + this.edited.material.shader.name, new GUILayoutOption[0]);
                }
                else
                {
                    GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    try
                    {
                        if (GUILayout.Button(ACCMaterialsView.CopyIcon, new GUILayoutOption[]
                        {
                            ACCMaterialsView.optUnitHeight,
                            ACCMaterialsView.optButonWidthS
                        }))
                        {
                            ACCMaterialsView.clipHandler.SetClipboard(MateHandler.Instance.ToText(this.edited));
                            if (this.tipsCall != null)
                            {
                                this.tipsCall("マテリアル情報をクリップボードに\nコピーしました");
                            }
                        }
                        GUI.enabled &= ACCMaterialsView.clipHandler.isMateText;
                        GUIContent[] array = ACCMaterialsView.PasteIcons;
                        if (GUILayout.Button(array[0], new GUILayoutOption[]
                        {
                            ACCMaterialsView.optUnitHeight,
                            ACCMaterialsView.optButonWidthS
                        }))
                        {
                            try
                            {
                                MateHandler.Instance.Write(this.edited, ACCMaterialsView.clipHandler.mateText);
                                if (this.tipsCall != null)
                                {
                                    this.tipsCall("マテリアル情報を貼付けました");
                                }
                            }
                            catch (Exception ex)
                            {
                                LogUtil.Error(new object[]
                                {
                                    "failed to import mateText",
                                    ex
                                });
                            }
                        }
                        ACCMaterialsView.includeOthers = GUILayout.Toggle(ACCMaterialsView.includeOthers, "CF", ACCMaterialsView.uiParams.tStyleSS, new GUILayoutOption[0]);
                        ACCMaterialsView.includeShader = GUILayout.Toggle(ACCMaterialsView.includeShader, "S", ACCMaterialsView.uiParams.tStyleSS, new GUILayoutOption[0]);
                        ACCMaterialsView.includeTex    = GUILayout.Toggle(ACCMaterialsView.includeTex, "T", ACCMaterialsView.uiParams.tStyleSS, new GUILayoutOption[0]);
                        GUI.enabled &= (ACCMaterialsView.includeTex | ACCMaterialsView.includeShader | ACCMaterialsView.includeOthers);
                        if (GUILayout.Button(array[1], new GUILayoutOption[]
                        {
                            ACCMaterialsView.optUnitHeight,
                            ACCMaterialsView.optButonWidth
                        }))
                        {
                            try
                            {
                                int num = 0;
                                if (ACCMaterialsView.includeTex)
                                {
                                    num |= MateHandler.MATE_TEX;
                                }
                                if (ACCMaterialsView.includeShader)
                                {
                                    num |= MateHandler.MATE_SHADER;
                                }
                                if (ACCMaterialsView.includeOthers)
                                {
                                    num |= (MateHandler.MATE_COLOR | MateHandler.MATE_FLOAT);
                                }
                                LogUtil.DebugF("material pasting from cp... tex={0}, shader={1}, others={2}", new object[]
                                {
                                    ACCMaterialsView.includeTex,
                                    ACCMaterialsView.includeShader,
                                    ACCMaterialsView.includeOthers
                                });
                                MateHandler.Instance.Write(this.edited, ACCMaterialsView.clipHandler.mateText, num);
                            }
                            catch (Exception ex2)
                            {
                                LogUtil.Error(new object[]
                                {
                                    "failed to import mateText",
                                    ex2
                                });
                            }
                            if (this.tipsCall != null)
                            {
                                this.tipsCall("マテリアル情報を貼付けました");
                            }
                        }
                    }
                    finally
                    {
                        GUI.enabled = true;
                        GUILayout.EndHorizontal();
                    }
                    var material = this.edited.material;
                    int idx      = this.edited.type.idx;
                    if (this.shaderCombo == null)
                    {
                        GUIContent buttonContent = (idx >= 0 && idx < ACCMaterialsView.ShaderNames.Length) ? ACCMaterialsView.ShaderNames[idx] : GUIContent.none;
                        this.shaderCombo = new ComboBoxLO(buttonContent, ACCMaterialsView.ShaderNames, ACCMaterialsView.uiParams.bStyleSC, ACCMaterialsView.uiParams.boxStyle, ACCMaterialsView.uiParams.listStyle, false);
                    }
                    else
                    {
                        this.shaderCombo.SelectedItemIndex = idx;
                    }
                    this.shaderCombo.Show(GUILayout.ExpandWidth(true));
                    int selectedItemIndex = this.shaderCombo.SelectedItemIndex;
                    if (idx != selectedItemIndex && selectedItemIndex != -1)
                    {
                        LogUtil.Debug(new object[]
                        {
                            "shader changed",
                            idx,
                            "=>",
                            selectedItemIndex
                        });
                        string text = ACCMaterialsView.ShaderNames[selectedItemIndex].text;
                        this.edited.ChangeShader(text, selectedItemIndex);
                    }
                    if (reload)
                    {
                        this.edited.renderQueue.Set(material.renderQueue);
                    }
                    this.sliderHelper.SetupFloatSlider("RQ", this.edited.renderQueue, this.edited.renderQueue.range.editMin, this.edited.renderQueue.range.editMax, delegate(float rq)
                    {
                        material.SetFloat(ShaderPropType.RenderQueue.propId, rq);
                        material.renderQueue = (int)rq;
                    }, ShaderPropType.RenderQueue.opts, ShaderPropType.RenderQueue.presetVals, ACCMaterialsView.rqResolver.Resolve(this.slotIdx));
                    ShaderType type = this.edited.type;
                    for (int i = 0; i < type.colProps.Length; i++)
                    {
                        ShaderPropColor shaderPropColor = type.colProps[i];
                        EditColor       editColor       = this.edited.editColors[i];
                        ColorPicker     picker          = this.edited.pickers[i];
                        if (reload)
                        {
                            editColor.Set(material.GetColor(shaderPropColor.propId));
                        }
                        if (this.sliderHelper.DrawColorSlider(shaderPropColor, ref editColor, picker))
                        {
                            material.SetColor(shaderPropColor.propId, editColor.val);
                        }
                    }
                    for (int j = 0; j < type.fProps.Length; j++)
                    {
                        //ACCMaterialsView.<>c__DisplayClass8 CS$<>8__locals2 = new ACCMaterialsView.<>c__DisplayClass8();
                        //CS$<>8__locals2.CS$<>8__locals5 = CS$<>8__locals1;
                        var prop = type.fProps[j];
                        if (reload)
                        {
                            this.edited.editVals[j].Set(material.GetFloat(prop.propId));
                        }
                        switch (prop.valType)
                        {
                        case ValType.Float:
                        {
                            ShaderPropFloat fprop = prop;
                            this.sliderHelper.SetupFloatSlider(fprop, this.edited.editVals[j], delegate(float val)
                                {
                                    fprop.SetValue(material, val);
                                });
                            break;
                        }

                        case ValType.Bool:
                            this.cbHelper.ShowCheckBox(prop.name, this.edited.editVals[j], delegate(float val)
                            {
                                prop.SetValue(material, val);
                            });
                            break;

                        case ValType.Enum:
                            this.cbHelper.ShowComboBox(prop.name, this.edited.editVals[j], delegate(int val)
                            {
                                prop.SetValue(material, (float)val);
                            });
                            break;
                        }
                    }
                }
            }
            finally
            {
                GUILayout.EndVertical();
            }
        }