private R2DC_Settings()
        {
            state = R2DD_State.Instance;

            // Contexts list
            UpdateContextsList();
        }
Beispiel #2
0
		private R2DC_Movement() { 
			selection = R2DC_Selection.Instance;
			bounds = R2DC_Bounds.Instance;
			ngui = R2DC_NGUI.Instance;
			state = R2DD_State.Instance;
			utils = R2DC_Utils.Instance;
		}
 private R2DC_Guides()
 {
     viewPixelFrame = R2DD_ContextInfo.Instance.viewPixelFrame;
     state          = R2DD_State.Instance;
     utils          = R2DC_Utils.Instance;
     resources      = R2DD_Resources.Instance;
 }
Beispiel #4
0
		private R2DV_PanelGrid() {
			drawing = R2DV_Drawing.Instance;
			resources = R2DD_Resources.Instance;
			utils = R2DC_Utils.Instance;
			state = R2DD_State.Instance;
			grid = R2DC_Grid.Instance;
		}
Beispiel #5
0
		private R2DC_Measure() {
			viewPixelFrame = R2DD_ContextInfo.Instance.viewPixelFrame;
			utils = R2DC_Utils.Instance;
			guides = R2DC_Guides.Instance;
			state = R2DD_State.Instance;
			selection = R2DC_Selection.Instance;
		}
 private R2DV_PanelSettings()
 {
     drawing   = R2DV_Drawing.Instance;
     resources = R2DD_Resources.Instance;
     utils     = R2DC_Utils.Instance;
     state     = R2DD_State.Instance;
 }
Beispiel #7
0
		private R2DV_Measure() {
			state 				= R2DD_State.Instance;
			drawing 			= R2DV_Drawing.Instance;
			viewPixelFrame 		= R2DD_ContextInfo.Instance.viewPixelFrame;
			resources 			= R2DD_Resources.Instance;
			measureController 	= R2DC_Measure.Instance;
			utils				= R2DC_Utils.Instance;
		}
		private R2DV_PanelToolbox() {
			drawing 	= R2DV_Drawing.Instance;
			resources 	= R2DD_Resources.Instance;
			movement 	= R2DC_Movement.Instance;
			state 		= R2DD_State.Instance;
			utils 		= R2DC_Utils.Instance;
			measure 	= R2DC_Measure.Instance;
		}
 private R2DC_Movement()
 {
     selection = R2DC_Selection.Instance;
     bounds    = R2DC_Bounds.Instance;
     ngui      = R2DC_NGUI.Instance;
     state     = R2DD_State.Instance;
     utils     = R2DC_Utils.Instance;
 }
 private R2DC_Measure()
 {
     viewPixelFrame = R2DD_ContextInfo.Instance.viewPixelFrame;
     utils          = R2DC_Utils.Instance;
     guides         = R2DC_Guides.Instance;
     state          = R2DD_State.Instance;
     selection      = R2DC_Selection.Instance;
 }
Beispiel #11
0
		private R2DV_Grid() {
			state 				= R2DD_State.Instance;
			drawing 			= R2DV_Drawing.Instance;
			resources 			= R2DD_Resources.Instance;
			grid				= R2DC_Grid.Instance;
			utils				= R2DC_Utils.Instance;
			viewPixelFrame 		= R2DD_ContextInfo.Instance.viewPixelFrame;
		}
Beispiel #12
0
		private R2DV_Coords() {
			viewPixelFrame 	= R2DD_ContextInfo.Instance.viewPixelFrame;
			drawing 		= R2DV_Drawing.Instance;
			state			= R2DD_State.Instance;
			guides			= R2DC_Guides.Instance;
			utils			= R2DC_Utils.Instance;
			measure			= R2DC_Measure.Instance;
		}
 private R2DV_PanelGrid()
 {
     drawing   = R2DV_Drawing.Instance;
     resources = R2DD_Resources.Instance;
     utils     = R2DC_Utils.Instance;
     state     = R2DD_State.Instance;
     grid      = R2DC_Grid.Instance;
 }
Beispiel #14
0
 private R2DV_Measure()
 {
     state             = R2DD_State.Instance;
     drawing           = R2DV_Drawing.Instance;
     viewPixelFrame    = R2DD_ContextInfo.Instance.viewPixelFrame;
     resources         = R2DD_Resources.Instance;
     measureController = R2DC_Measure.Instance;
     utils             = R2DC_Utils.Instance;
 }
Beispiel #15
0
 private R2DV_Coords()
 {
     viewPixelFrame = R2DD_ContextInfo.Instance.viewPixelFrame;
     drawing        = R2DV_Drawing.Instance;
     state          = R2DD_State.Instance;
     guides         = R2DC_Guides.Instance;
     utils          = R2DC_Utils.Instance;
     measure        = R2DC_Measure.Instance;
 }
Beispiel #16
0
 private R2DV_Guides()
 {
     state            = R2DD_State.Instance;
     drawing          = R2DV_Drawing.Instance;
     viewPixelFrame   = R2DD_ContextInfo.Instance.viewPixelFrame;
     resources        = R2DD_Resources.Instance;
     guidesController = R2DC_Guides.Instance;
     utils            = R2DC_Utils.Instance;
 }
Beispiel #17
0
		private R2DV_Guides() {
			state 				= R2DD_State.Instance;
			drawing 			= R2DV_Drawing.Instance;
			viewPixelFrame 		= R2DD_ContextInfo.Instance.viewPixelFrame;
			resources 			= R2DD_Resources.Instance;
			guidesController 	= R2DC_Guides.Instance;
			utils				= R2DC_Utils.Instance;
			
		}
Beispiel #18
0
 private R2DV_Grid()
 {
     state          = R2DD_State.Instance;
     drawing        = R2DV_Drawing.Instance;
     resources      = R2DD_Resources.Instance;
     grid           = R2DC_Grid.Instance;
     utils          = R2DC_Utils.Instance;
     viewPixelFrame = R2DD_ContextInfo.Instance.viewPixelFrame;
 }
Beispiel #19
0
 private R2DV_PanelToolbox()
 {
     drawing   = R2DV_Drawing.Instance;
     resources = R2DD_Resources.Instance;
     movement  = R2DC_Movement.Instance;
     state     = R2DD_State.Instance;
     utils     = R2DC_Utils.Instance;
     measure   = R2DC_Measure.Instance;
 }
        private R2DV_Rulers()
        {
            contextInfo    = R2DD_ContextInfo.Instance;
            state          = R2DD_State.Instance;
            drawing        = R2DV_Drawing.Instance;
            viewUnitFrame  = contextInfo.viewUnitFrame;
            viewPixelFrame = contextInfo.viewPixelFrame;
            resources      = R2DD_Resources.Instance;
            utils          = R2DC_Utils.Instance;

            InitScaleTable();
        }
        public bool LoadContextInfo(SceneView sceneView)
        {
            R2DD_State state = R2DD_State.Instance;

            this.sceneView      = sceneView;
            cam                 = new R2DD_VirtualCam(sceneView.camera);
            editorCameraSize    = cam.orthographicSize;
            gridPixelSquareSize = cam.WorldToScreenPoint(new Vector3(1, 1)) - cam.WorldToScreenPoint(new Vector3(0, 0));
            scale               = Vector3.one;
            origin              = Vector3.zero;

            Context context = state.context;

            if (context.type == ContextType.Canvas)
            {
                if (context.gameObject == null)
                {
                    return(false);
                }

                scale  = context.gameObject.transform.lossyScale;
                origin = context.gameObject.GetComponent <RectTransform>().position;

                if (scale.x <= 0.001f || scale.y <= 0.001f)
                {
                    return(false);
                }
            }
            else if (context.type == ContextType.NGUI)
            {
                if (context.gameObject == null)
                {
                    return(false);
                }

                scale  = context.gameObject.transform.lossyScale;
                origin = context.gameObject.GetComponent <Transform>().position;
            }

            LoadPixelFrame();
            LoadWorldUnits();

            return(true);
        }
		private R2DV_PanelSettings() {
			drawing = R2DV_Drawing.Instance;
			resources = R2DD_Resources.Instance;
			utils = R2DC_Utils.Instance;
			state = R2DD_State.Instance;
		}
 private R2DV_Toolbar()
 {
     state     = R2DD_State.Instance;
     drawing   = R2DV_Drawing.Instance;
     resources = R2DD_Resources.Instance;
 }
Beispiel #24
0
		private R2DV_Toolbar() {
			state = R2DD_State.Instance;
			drawing = R2DV_Drawing.Instance;
			resources = R2DD_Resources.Instance;
		}
Beispiel #25
0
 private R2DC_Grid()
 {
     state     = R2DD_State.Instance;
     utils     = R2DC_Utils.Instance;
     selection = R2DC_Selection.Instance;
 }
Beispiel #26
0
		private R2DC_Settings() {
			state = R2DD_State.Instance;

			// Contexts list 
			UpdateContextsList();
		}
 private R2DC_Guides()
 {
     viewPixelFrame = R2DD_ContextInfo.Instance.viewPixelFrame;
     state = R2DD_State.Instance;
     utils = R2DC_Utils.Instance;
 }
Beispiel #28
0
 private R2DC_Bounds()
 {
     ngui  = R2DC_NGUI.Instance;
     state = R2DD_State.Instance;
 }
 private R2DC_Grid()
 {
     state 				= R2DD_State.Instance;
     utils				= R2DC_Utils.Instance;
     selection			= R2DC_Selection.Instance;
 }
Beispiel #30
0
		private R2DC_Bounds() {
			ngui = R2DC_NGUI.Instance;	
			state = R2DD_State.Instance;
		}