////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public HovercastState(IItemHierarchy pItemHierarchy, HovercursorSetup pHovercusorSetup,
                              InteractionSettings pInterSett, IInput pInput, Transform pBaseTx)
        {
            vInteractSettings = pInterSett;
            vHovercursorSetup = pHovercusorSetup;
            vInput            = pInput;
            BaseTransform     = pBaseTx;

            FullMenu          = new MenuState(pItemHierarchy, vInteractSettings);
            ActiveCursorTypes = new CursorType[0];

            vCursorMap = new Dictionary <CursorType, ICursorState>();

            vLeftCursorConvertMap = new Dictionary <HovercastCursorType, CursorType> {
                { HovercastCursorType.Palm, CursorType.LeftPalm },
                { HovercastCursorType.Thumb, CursorType.LeftThumb },
                { HovercastCursorType.Index, CursorType.LeftIndex },
                { HovercastCursorType.Middle, CursorType.LeftMiddle },
                { HovercastCursorType.Ring, CursorType.LeftRing },
                { HovercastCursorType.Pinky, CursorType.LeftPinky },
                { HovercastCursorType.Look, CursorType.Look }
            };

            vRightCursorConvertMap = new Dictionary <HovercastCursorType, CursorType> {
                { HovercastCursorType.Palm, CursorType.RightPalm },
                { HovercastCursorType.Thumb, CursorType.RightThumb },
                { HovercastCursorType.Index, CursorType.RightIndex },
                { HovercastCursorType.Middle, CursorType.RightMiddle },
                { HovercastCursorType.Ring, CursorType.RightRing },
                { HovercastCursorType.Pinky, CursorType.RightPinky },
                { HovercastCursorType.Look, CursorType.Look }
            };

            OnSideChange += (() => {});
        }
		////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public IItemHierarchy GetRoot() {
			if ( vRoot == null ) {
				var rootLevel = new ItemGroup(GetChildItems);

				vRoot = new ItemHierarchy();
				vRoot.Title = Title;
				vRoot.Build(rootLevel);
			}

			return vRoot;
		}
Ejemplo n.º 3
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public MenuState(IItemHierarchy pItemHierarchy, InteractionSettings pInteractSettings)
        {
            vItemHierarchy    = pItemHierarchy;
            vInteractSettings = pInteractSettings;
            vItems            = new List <BaseItemState>();
            vCurrentCursors   = new ICursorState[0];

            OnLevelChange += (d => {});

            vItemHierarchy.OnLevelChange += HandleLevelChange;
            HandleLevelChange(0);
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public IItemHierarchy GetRoot()
        {
            if (vRoot == null)
            {
                var rootLevel = new ItemGroup(GetChildItems);

                vRoot       = new ItemHierarchy();
                vRoot.Title = Title;
                vRoot.Build(rootLevel);
            }

            return(vRoot);
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public MenuState(IItemHierarchy pItemHierarchy, InteractionSettings pInteractSettings)
        {
            vItemHierarchy = pItemHierarchy;
            vInteractSettings = pInteractSettings;

            vAllItems = new List<BaseItemState>();
            vItems = new List<BaseItemState>();
            vCurrentCursors = new ICursorState[0];
            vPalmItem = new BaseItemState(vItemHierarchy.NavigateBackItem, pInteractSettings);

            OnLevelChange += (d => {});

            vItemHierarchy.OnLevelChange += HandleLevelChange;
            HandleLevelChange(0);
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public MenuState(IItemHierarchy pItemHierarchy, InteractionSettings pInteractSettings)
        {
            vItemHierarchy    = pItemHierarchy;
            vInteractSettings = pInteractSettings;

            vAllItems       = new List <BaseItemState>();
            vItems          = new ReadList <BaseItemState>();
            vLevelItems     = new ReadList <IBaseItemState>();
            vPalmItem       = new BaseItemState(vItemHierarchy.NavigateBackItem, pInteractSettings);
            vCurrentCursors = new List <ICursorState>();

            OnLevelChange += (d => {});

            vItemHierarchy.OnLevelChange += HandleLevelChange;
            HandleLevelChange(0);
        }
Ejemplo n.º 7
0
		////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public HovercastState(IItemHierarchy pItemHierarchy, HovercursorSetup pHovercusorSetup, 
				InteractionSettings pInterSett, IInput pInput, Transform pBaseTx) {
			vInteractSettings = pInterSett;
			vHovercursorSetup = pHovercusorSetup;
			vInput = pInput;
			BaseTransform = pBaseTx;

			FullMenu = new MenuState(pItemHierarchy, vInteractSettings);

			vActiveCursorInteractions = new ReadList<IBaseItemInteractionState>();
			vMenuPlanes = new ReadList<PlaneData>();
			vActiveCursorTypes = new ReadList<CursorType>();

			ActiveCursorTypes = vActiveCursorTypes.ReadOnly;

			vLeftCursorConvertMap = 
				new Dictionary<HovercastCursorType, CursorType>(HovercastCursorTypeComparer);
			vLeftCursorConvertMap.Add(HovercastCursorType.Palm, CursorType.LeftPalm);
			vLeftCursorConvertMap.Add(HovercastCursorType.Thumb, CursorType.LeftThumb);
			vLeftCursorConvertMap.Add(HovercastCursorType.Index, CursorType.LeftIndex);
			vLeftCursorConvertMap.Add(HovercastCursorType.Middle, CursorType.LeftMiddle);
			vLeftCursorConvertMap.Add(HovercastCursorType.Ring, CursorType.LeftRing);
			vLeftCursorConvertMap.Add(HovercastCursorType.Pinky, CursorType.LeftPinky);
			vLeftCursorConvertMap.Add(HovercastCursorType.Look, CursorType.Look);

			vRightCursorConvertMap =
				new Dictionary<HovercastCursorType, CursorType>(HovercastCursorTypeComparer);
			vRightCursorConvertMap.Add(HovercastCursorType.Palm, CursorType.RightPalm);
			vRightCursorConvertMap.Add(HovercastCursorType.Thumb, CursorType.RightThumb);
			vRightCursorConvertMap.Add(HovercastCursorType.Index, CursorType.RightIndex);
			vRightCursorConvertMap.Add(HovercastCursorType.Middle, CursorType.RightMiddle);
			vRightCursorConvertMap.Add(HovercastCursorType.Ring, CursorType.RightRing);
			vRightCursorConvertMap.Add(HovercastCursorType.Pinky, CursorType.RightPinky);
			vRightCursorConvertMap.Add(HovercastCursorType.Look, CursorType.Look);

			OnSideChange += (() => {});
		}