public static void ShowMilestoneEditor(Rect rect, MilestoneDataControl milestone)
        {
            var window = MilestoneEditorWindow.Create(milestone);

            rect.position = GUIUtility.GUIToScreenPoint(rect.position);
            window.ShowAsDropDown(rect, new Vector2(Mathf.Max(rect.width, 250), 300));
        }
 public CompletableDataControl(Completable completable)
 {
     this.completable         = completable;
     this.startDataControl    = new MilestoneDataControl(completable.getStart());
     this.endDataControl      = new MilestoneDataControl(completable.getEnd());
     this.progressDataControl = new ProgressDataControl(completable.getProgress());
     this.scoreDataControl    = new ScoreDataControl(completable.getScore());
 }
        private void SelectElement <T>(MilestoneDataControl milestone, string label)
        {
            var ids = Controller.Instance.IdentifierSummary.getIds <T>();

            if (ids.Length == 0)
            {
                EditorGUILayout.HelpBox("There are no elements for the selected type!", MessageType.Error);
                return;
            }

            var newId = ids[EditorGUILayout.Popup(label, Mathf.Max(0, Array.IndexOf(ids, milestone.getId())), ids)];

            Milestone.setId(newId);
        }
 public static MilestoneEditorWindow Create(MilestoneDataControl mil)
 {
     editor           = ScriptableObject.CreateInstance <MilestoneEditorWindow>();
     editor.Milestone = mil;
     return(editor);
 }