public override void OnGUI(Rect rect)
{
GUILayout.BeginVertical(new GUILayoutOption[0]);
GUILayout.Label(styles.sEnvironment, EditorStyles.miniLabel, new GUILayoutOption[0]);
EditorGUI.BeginChangeCheck();
float num = EditorGUILayout.Slider(styles.sAngleOffset, this.m_CubemapInfo.angleOffset % 360f, -360f, 360f, new GUILayoutOption[0]);
if (EditorGUI.EndChangeCheck())
{
Undo.RecordObject(this.m_LookDevView.envLibrary, "Changed environment settings");
this.m_CubemapInfo.angleOffset = num;
this.m_LookDevView.envLibrary.dirty = true;
this.m_LookDevView.Repaint();
}
if (GUILayout.Button(styles.sResetEnv, EditorStyles.toolbarButton, new GUILayoutOption[0]))
{
Undo.RecordObject(this.m_LookDevView.envLibrary, "Changed environment settings");
this.m_CubemapInfo.ResetEnvInfos();
this.m_LookDevView.envLibrary.dirty = true;
this.m_LookDevView.Repaint();
}
using (new EditorGUI.DisabledScope(!this.m_LookDevView.config.enableShadowCubemap))
{
this.DrawSeparator();
GUILayout.Label(styles.sShadows, EditorStyles.miniLabel, new GUILayoutOption[0]);
EditorGUI.BeginChangeCheck();
float num2 = EditorGUILayout.Slider(styles.sShadowIntensity, this.m_CubemapInfo.shadowInfo.shadowIntensity, 0f, 5f, new GUILayoutOption[0]);
Color color = EditorGUILayout.ColorField(styles.sShadowColor, this.m_CubemapInfo.shadowInfo.shadowColor, new GUILayoutOption[0]);
if (EditorGUI.EndChangeCheck())
{
Undo.RecordObject(this.m_LookDevView.envLibrary, "Changed shadow settings");
this.m_CubemapInfo.shadowInfo.shadowIntensity = num2;
this.m_CubemapInfo.shadowInfo.shadowColor = color;
this.m_LookDevView.envLibrary.dirty = true;
this.m_LookDevView.Repaint();
}
if (GUILayout.Button(styles.sBrightest, EditorStyles.toolbarButton, new GUILayoutOption[0]))
{
Undo.RecordObject(this.m_LookDevView.envLibrary, "Changed shadow settings");
LookDevResources.UpdateShadowInfoWithBrightestSpot(this.m_CubemapInfo);
this.m_LookDevView.envLibrary.dirty = true;
this.m_LookDevView.Repaint();
}
if (GUILayout.Button(styles.sResetShadow, EditorStyles.toolbarButton, new GUILayoutOption[0]))
{
Undo.RecordObject(this.m_LookDevView.envLibrary, "Changed shadow settings");
this.m_CubemapInfo.SetCubemapShadowInfo(this.m_CubemapInfo);
this.m_LookDevView.envLibrary.dirty = true;
this.m_LookDevView.Repaint();
}
}
GUILayout.EndVertical();
}