private void OnGUI() { if (BumpMapSettingsFixingWindow.s_Styles == null) { BumpMapSettingsFixingWindow.s_Styles = new BumpMapSettingsFixingWindow.Styles(); base.minSize = new Vector2(400f, 300f); base.position = new Rect(base.position.x, base.position.y, base.minSize.x, base.minSize.y); } GUILayout.Space(5f); GUILayout.Label(BumpMapSettingsFixingWindow.s_Styles.overviewText, new GUILayoutOption[0]); GUILayout.Space(10f); GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Space(10f); IEnumerator enumerator = ListViewGUILayout.ListView(this.m_LV, BumpMapSettingsFixingWindow.s_Styles.box, new GUILayoutOption[0]).GetEnumerator(); try { while (enumerator.MoveNext()) { ListViewElement listViewElement = (ListViewElement)enumerator.Current; if (listViewElement.row == this.m_LV.row && Event.current.type == EventType.Repaint) { BumpMapSettingsFixingWindow.s_Styles.selected.Draw(listViewElement.position, false, false, false, false); } GUILayout.Label(this.m_Paths[listViewElement.row], new GUILayoutOption[0]); } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } GUILayout.Space(10f); GUILayout.EndHorizontal(); GUILayout.Space(10f); GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); if (GUILayout.Button("Fix now", BumpMapSettingsFixingWindow.s_Styles.button, new GUILayoutOption[0])) { InternalEditorUtility.BumpMapSettingsFixingWindowReportResult(1); base.Close(); } if (GUILayout.Button("Ignore", BumpMapSettingsFixingWindow.s_Styles.button, new GUILayoutOption[0])) { InternalEditorUtility.BumpMapSettingsFixingWindowReportResult(0); base.Close(); } GUILayout.Space(10f); GUILayout.EndHorizontal(); GUILayout.Space(10f); }
void OnGUI() { if (s_Styles == null) { s_Styles = new Styles(); minSize = new Vector2(400, 300); position = new Rect(position.x, position.y, minSize.x, minSize.y); } GUILayout.Space(5); GUILayout.Label(s_Styles.overviewText); GUILayout.Space(10); GUILayout.BeginHorizontal(); GUILayout.Space(10); foreach (ListViewElement el in ListViewGUILayout.ListView(m_LV, s_Styles.box)) { if (el.row == m_LV.row && Event.current.type == EventType.Repaint) { s_Styles.selected.Draw(el.position, false, false, false, false); } GUILayout.Label(m_Paths[el.row]); } GUILayout.Space(10); GUILayout.EndHorizontal(); GUILayout.Space(10); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Fix now", s_Styles.button)) { InternalEditorUtility.BumpMapSettingsFixingWindowReportResult(1); Close(); } if (GUILayout.Button("Ignore", s_Styles.button)) { InternalEditorUtility.BumpMapSettingsFixingWindowReportResult(0); Close(); } GUILayout.Space(10); GUILayout.EndHorizontal(); GUILayout.Space(10); }
private void OnGUI() { if (BumpMapSettingsFixingWindow.s_Styles == null) { BumpMapSettingsFixingWindow.s_Styles = new BumpMapSettingsFixingWindow.Styles(); base.minSize = new Vector2(400f, 300f); base.position = new Rect(base.position.x, base.position.y, base.minSize.x, base.minSize.y); } GUILayout.Space(5f); GUILayout.Label(BumpMapSettingsFixingWindow.s_Styles.overviewText, new GUILayoutOption[0]); GUILayout.Space(10f); GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Space(10f); foreach (ListViewElement listViewElement in ListViewGUILayout.ListView(this.m_LV, BumpMapSettingsFixingWindow.s_Styles.box, new GUILayoutOption[0])) { if (listViewElement.row == this.m_LV.row && Event.current.type == EventType.Repaint) { BumpMapSettingsFixingWindow.s_Styles.selected.Draw(listViewElement.position, false, false, false, false); } GUILayout.Label(this.m_Paths[listViewElement.row], new GUILayoutOption[0]); } GUILayout.Space(10f); GUILayout.EndHorizontal(); GUILayout.Space(10f); GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); if (GUILayout.Button("Fix now", BumpMapSettingsFixingWindow.s_Styles.button, new GUILayoutOption[0])) { InternalEditorUtility.BumpMapSettingsFixingWindowReportResult(1); base.Close(); } if (GUILayout.Button("Ignore", BumpMapSettingsFixingWindow.s_Styles.button, new GUILayoutOption[0])) { InternalEditorUtility.BumpMapSettingsFixingWindowReportResult(0); base.Close(); } GUILayout.Space(10f); GUILayout.EndHorizontal(); GUILayout.Space(10f); }
private void OnDestroy() { InternalEditorUtility.BumpMapSettingsFixingWindowReportResult(0); }