예제 #1
0
        public void OnGUI()
        {
            if (parentEtude == BlueprintGuid.Empty)
            {
                return;
            }

            //HandleEvents();

            UI.Label($"Child Etudes: {loadedEtudes[parentEtude].Name}", UI.AutoWidth());

            //GUI.DrawTextureWithTexCoords(workspaceRect, etudeViewer.grid,
            //    new Rect(_zoomCoordsOrigin.x / 30, -_zoomCoordsOrigin.y / 30, workspaceRect.width / (30 * _zoom),
            //        workspaceRect.height / (30 * _zoom)));

#if false
            PrepareLayout();
            DrawSelection();
            DrawLines();
            DrawEtudes();
            DrawReferences();
            DrawFind();
            GUILayout.EndArea();
            EditorZoomArea.End();

            if (newParentFromContestComand)
            {
                if (loadedEtudes.ContainsKey(newParentID))
                {
                    BlueprintEtude clickedEtude = (BlueprintEtude)ResourcesLibrary.TryGetBlueprint(newParentID);
                    Selection.activeObject = BlueprintEditorWrapper.Wrap(clickedEtude);

                    if (clickedEtude.Parent.IsEmpty())
                    {
                        parentEtude = clickedEtude.AssetGuid;
                    }
                    else
                    {
                        parentEtude = clickedEtude.Parent.GetBlueprint().AssetGuid;
                    }

                    etudeDrawerData    = new Dictionary <BlueprintGuid, EtudeDrawerData>();
                    _zoomCoordsOrigin  = Vector2.zero;
                    FirstLayoutProcess = true;
                }

                newParentFromContestComand = false;
            }
#endif
        }
예제 #2
0
 public static void TryToSetParent(BlueprintGuid parent)
 {
     newParentFromContestComand = true;
     newParentID = parent;
 }
예제 #3
0
 public void SetParent(BlueprintGuid parent)
 {
     parentEtude        = parent;
     etudeDrawerData    = new Dictionary <BlueprintGuid, EtudeDrawerData>();
     FirstLayoutProcess = true;
 }