Example #1
0
        public void SetGizmoType(string gizmoType)
        {
            HideGizmo();

            if (gizmoType != DCL.Components.DCLGizmos.Gizmo.NONE)
            {
                bool wasGizmoActive = IsGizmoActive();

                for (int i = 0; i < gizmos.Length; i++)
                {
                    if (gizmos[i].GetGizmoType() == gizmoType)
                    {
                        activeGizmo = gizmos[i];
                        activeGizmo.SetSnapFactor(snapInfo);
                        break;
                    }
                }

                bool areEntitiesSelected = selectedEntities != null && selectedEntities.Count > 0;
                if (wasGizmoActive && areEntitiesSelected)
                {
                    ShowGizmo();
                }
                else
                {
                    GizmoStatusUpdate();
                }
            }
            else
            {
                activeGizmo = null;
            }
        }
Example #2
0
        private void OnBeginDrag(DCLBuilderGizmoAxis hittedAxis)
        {
            isTransformingObject = true;
            activeGizmo          = hittedAxis.GetGizmo();
            activeGizmo.OnBeginDrag(hittedAxis, selectedEntitiesParent);

            OnGizmoTransformObjectStart?.Invoke(activeGizmo.GetGizmoType());
        }
Example #3
0
 public void SetGizmo(DCLBuilderGizmo parentGizmo)
 {
     gizmo = parentGizmo;
 }