private void SettingsGUI() { if (DIGUI.SettingsButton()) { SettingsWindow.Open(); } }
protected override void SelfGUI() { if (ValueEntry == null) { return; } using (new EditorGUILayout.HorizontalScope()) { // Reserve area for foldout triangle. // Foldout is going to draw after value of this instance is drawn since its' visibility depends on // child count of this drawer, that is, depends on value drawn by this drawer and DrawSelf must be called // before drawing foldout triangle. FoldoutRect = DIGUI.GetFoldoutToggleRect(); FieldGUI(); if (ChildCount > 0 && !IsReferenceOfParent) { ChildrenVisible = DIGUI.FoldoutToggle(FoldoutRect, ChildrenVisible); } } if (Event.current.type == EventType.Repaint) { FieldRect = GUILayoutUtility.GetLastRect(); } ReferenceEmphasisGUI(); }
protected override void SelfGUI() { if (ChildCount > 0) { EditorGUILayout.BeginHorizontal(); ChildrenVisible = DIGUI.FoldoutToggle(ChildrenVisible, false); EditorGUILayout.LabelField(Name); EditorGUILayout.EndHorizontal(); } }
protected virtual void ValueErrorGUI() { if (!ValueAccessResult.IsNullOrFailed(drawingValueGetResult) || !ValueAccessResult.IsNullOrFailed(drawnValueSetResult)) { return; } if (DIGUI.ErrorButton(GetErrorButtonTooltip())) { var window = ValueAccessResultWindow.Open(); window.GetResult = drawingValueGetResult ?? default(ValueAccessResult); window.SetResult = drawnValueSetResult ?? default(ValueAccessResult); } }
protected virtual void ReferencedParentGUI() { if (ValueEntry.TypeOfValue.IsValueType) { return; } if (!IsReferenceOfParent) { return; } if (DIGUI.GoUpButton(FoldoutRect)) { ReferenceEmphasis(); } }
protected virtual void PageSelectGUI() { using (new EditorGUILayout.HorizontalScope()) { EditorGUIEx.MinWidthLabelField(GetItemCountText()); if (DIGUI.PageFlipButton(DIGUIContents.PrevButton)) { CurrentPageIndex--; } int pageCount = PageCount; int pageNo = pageCount == 0 ? 0 : CurrentPageIndex + 1; pageNo = EditorGUIEx.MinWidthDelayedIntField(pageNo); CurrentPageIndex = pageCount == 0 ? 0 : pageNo - 1; EditorGUIEx.MinWidthLabelField("/" + PageCount); if (DIGUI.PageFlipButton(DIGUIContents.NextButton) && ItemCountInCurrentPage == ItemCountPerPage) { CurrentPageIndex++; } } }