internal virtual void Draw(MaintainerWindow parentWindow) { if (records == null) { records = LoadLastRecords(); ApplySorting(); recordsTotalPages = (int)Math.Ceiling((double)filteredRecords.Length / RECORDS_PER_PAGE); PerformPostRefreshActions(); } window = parentWindow; using (layout.Horizontal()) { DrawLeftSection(); DrawRightSection(); } if (gotoRecord != null) { gotoRecord.Show(); gotoRecord = null; } }
internal virtual void Draw(MaintainerWindow parentWindow) { if (records == null) { LoadLastRecords(); if (records != null) { recordsTotalPages = (int)Math.Ceiling((double)records.Length / RECORDS_PER_PAGE); } else { Debug.Log("records null"); recordsTotalPages = 0; } } window = parentWindow; using (UIHelpers.Horizontal()) { DrawSettingsSection(); DrawSearchSection(); } if (gotoRecord != null) { gotoRecord.Show(); gotoRecord = null; } ProcessUserActions(); }
/* protected methods */ protected void DrawShowButtonIfPossible(T record) { IShowableRecord showableIssueRecord = record as IShowableRecord; if (showableIssueRecord == null) { return; } string hintText; switch (record.location) { case RecordLocation.Unknown: hintText = "Oh, sorry, but looks like I have no clue about this record."; break; case RecordLocation.Scene: hintText = "Selects item in the scene. Opens scene with target item if necessary and highlights this scene in the Project Browser."; break; case RecordLocation.Asset: hintText = "Selects asset file in the Project Browser."; break; case RecordLocation.Prefab: hintText = "Selects Prefab file with item in the Project Browser."; break; case RecordLocation.BuildSettings: hintText = "Opens BuildSettings window."; break; case RecordLocation.TagsAndLayers: hintText = "Opens Tags and Layers in inspector."; break; default: throw new ArgumentOutOfRangeException(); } if (UIHelpers.RecordButton(record, "Show", hintText, CSIcons.Show)) { gotoRecord = showableIssueRecord; } }
protected void AddShowButtonIfPossible(RecordBase record) { IShowableRecord showableIssueRecord = record as IShowableRecord; if (showableIssueRecord != null) { string hintText; switch (record.location) { case RecordLocation.Unknown: hintText = "Oh, sorry, but looks like I have no clue about this issue."; break; case RecordLocation.Scene: hintText = "Selects Game Object with issue in the scene. Opens scene with target Game Object if necessary and highlights this scene in the Project Browser."; break; case RecordLocation.Asset: hintText = "Selects asset file in the Project Browser."; break; case RecordLocation.Prefab: hintText = "Selects Prefab file where sits the Game Object with issue in the Project Browser."; break; case RecordLocation.BuildSettings: hintText = "Opens BuildSettings window to let you check the issue."; break; case RecordLocation.TagsAndLayers: hintText = "Opens Tags and Layers in inspector to let you check the issue."; break; default: throw new ArgumentOutOfRangeException(); } if (GUILayout.Button(new GUIContent("Show", hintText), UIHelpers.recordButton)) { gotoRecord = showableIssueRecord; } } }
public override void Draw() { if (records == null) { records = LoadLastRecords(); rightColumnScrollPosition = GetState().scrollPosition; ApplySorting(); ApplyState(); recordsTotalPages = (int)Math.Ceiling((double)filteredRecords.Length / RecordsPerPage); PerformPostRefreshActions(); } base.Draw(); if (gotoRecord != null) { gotoRecord.Show(); gotoRecord = null; } }
public virtual void Draw() { if (records == null) { records = LoadLastRecords(); searchSectionScrollPosition = GetState().searchSectionScrollPosition; ApplySorting(); ApplyState(); recordsTotalPages = (int)Math.Ceiling((double)filteredRecords.Length / RecordsPerPage); PerformPostRefreshActions(); } using (new GUILayout.HorizontalScope()) { DrawLeftSection(); DrawRightSection(); } if (gotoRecord != null) { gotoRecord.Show(); gotoRecord = null; } }