// Token: 0x0600030E RID: 782 RVA: 0x00018C10 File Offset: 0x00016E10 internal void ShowCheckBox(string label, EditValue edit, Action <float> func) { GUILayout.BeginHorizontal(new GUILayoutOption[0]); try { GUILayout.Label(label, this.uiParams.lStyle, new GUILayoutOption[] { this.optItemHeight }); GUILayout.Space((float)this.uiParams.marginL); float num = edit.val; GUIContent content = NumberUtil.Equals(num, 0f, 0.001f) ? ResourceHolder.Instance.Checkoff : ResourceHolder.Instance.Checkon; if (GUILayout.Button(content, this.bStyleCenter, new GUILayoutOption[] { GUILayout.Width(50f) })) { num = 1f - num; edit.Set(num); func(num); } } finally { GUILayout.EndHorizontal(); } }
internal void SetupFloatSlider(string label, EditValue edit, float sliderMin, float sliderMax, Action <float> func, PresetOperation[] presetOprs, float[] vals1, float[] vals2) { GUILayout.BeginHorizontal(); GUILayout.Label(label, uiParams.lStyle, optItemHeight); GUILayout.Space(uiParams.marginL); var changed = false; Action <float> preset = (val) => { var cont = new GUIContent(val.ToString(CultureInfo.InvariantCulture)); if (!GUILayout.Button(cont, bStyleSS, getWidthOpt(cont))) { return; } edit.Set(val); changed = true; }; if (vals1 != null) { foreach (var val in vals1) { preset(val); } } if (vals2 != null) { foreach (var val in vals2) { preset(val); } } if (presetOprs != null) { foreach (var pset in presetOprs) { var cont = new GUIContent(pset.label); if (!GUILayout.Button(cont, bStyleSS, getWidthOpt(cont))) { continue; } edit.SetWithCheck(pset.func(edit.val)); changed = true; } } GUILayout.EndHorizontal(); if (changed || DrawValueSlider(null, edit, sliderMin, sliderMax)) { func(edit.val); } }
// Token: 0x06000322 RID: 802 RVA: 0x000193A4 File Offset: 0x000175A4 internal void SetupFloatSlider(string label, EditValue edit, float sliderMin, float sliderMax, Action <float> func, PresetOperation[] presetOprs, float[] vals1, float[] vals2) { GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Label(label, this.uiParams.lStyle, new GUILayoutOption[] { this.optItemHeight }); GUILayout.Space((float)this.uiParams.marginL); bool changed = false; Action <float> action = delegate(float val) { GUIContent guicontent2 = new GUIContent(val.ToString(CultureInfo.InvariantCulture)); if (!GUILayout.Button(guicontent2, this.bStyleSS, new GUILayoutOption[] { this.getWidthOpt(guicontent2) })) { return; } edit.Set(val); changed = true; }; if (vals1 != null) { foreach (float obj in vals1) { action(obj); } } if (vals2 != null) { foreach (float obj2 in vals2) { action(obj2); } } if (presetOprs != null) { foreach (PresetOperation presetOperation in presetOprs) { GUIContent guicontent = new GUIContent(presetOperation.label); if (GUILayout.Button(guicontent, this.bStyleSS, new GUILayoutOption[] { this.getWidthOpt(guicontent) })) { edit.SetWithCheck(presetOperation.func(edit.val)); changed = true; } } } GUILayout.EndHorizontal(); if (changed || this.DrawValueSlider(null, edit, sliderMin, sliderMax)) { func(edit.val); } }
// Token: 0x0600030C RID: 780 RVA: 0x00018AF0 File Offset: 0x00016CF0 internal void ShowComboBox(string label, EditValue edit, Action <int> func) { int num = (int)edit.val; if (this.ShowComboBox(label, CheckboxHelper.CompareFuncs, ref this.compareCombo, ref num, func)) { edit.Set((float)num); } }
internal void ShowComboBox(string label, EditValue edit, Action <int> func) { var idx = (int)edit.val; if (ShowComboBox(label, CompareFuncs, ref compareCombo, ref idx, func)) { edit.Set(idx); } }
public bool DrawValueSlider(string label, EditValue edit, float min, float max) { return(DrawValueSlider(label, edit, () => { var sliderVal = edit.val; if (DrawSlider(ref sliderVal, min, max)) { edit.Set(sliderVal); return true; } return false; })); }
// Token: 0x06000329 RID: 809 RVA: 0x00019C44 File Offset: 0x00017E44 public bool DrawValueSlider(string label, EditValue edit, float min, float max) { return(this.DrawValueSlider <float>(label, edit, delegate() { float val = edit.val; if (this.DrawSlider(ref val, min, max)) { edit.Set(val); return true; } return false; })); }
public ACCMaterial(Material m, Renderer r = null) { this.material = m; this.renderer = r; name = m.name; type = ShaderType.Resolve(m.shader.name); if (type == ShaderType.UNKNOWN) { return; //throw new Exception("ShaderType has not found:" + m.shader.name); } renderQueue.Set(m.renderQueue); rqEdit = renderQueue.ToString(); InitType(); }
internal void ShowCheckBox(string label, EditValue edit, Action <float> func) { GUILayout.BeginHorizontal(); try { GUILayout.Label(label, uiParams.lStyle, optItemHeight); GUILayout.Space(uiParams.marginL); var val = edit.val; var cont = NumberUtil.Equals(val, 0f) ? ResourceHolder.Instance.Checkoff : ResourceHolder.Instance.Checkon; if (!GUILayout.Button(cont, bStyleCenter, GUILayout.Width(50))) { return; } val = 1 - val; edit.Set(val); func(val); } finally { GUILayout.EndHorizontal(); } }