コード例 #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;
 }