当前位置: 首页>>代码示例>>C#>>正文


C# CursorType类代码示例

本文整理汇总了C#中CursorType的典型用法代码示例。如果您正苦于以下问题:C# CursorType类的具体用法?C# CursorType怎么用?C# CursorType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CursorType类属于命名空间,在下文中一共展示了CursorType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetBundle

 ////////////////////////////////////////////////////////////////////////////////////////////////
 /*--------------------------------------------------------------------------------------------*/
 private Bundle GetBundle(CursorType pType, Func<bool> pShowFunc)
 {
     var bundle = new Bundle();
     bundle.CursorType = pType;
     bundle.ShowFunc = pShowFunc;
     return bundle;
 }
开发者ID:changjiashuai,项目名称:Hover-VR-Interface-Kit,代码行数:9,代码来源:DemoBoardToggle.cs

示例2: FindNearestItemToCursor

        /*--------------------------------------------------------------------------------------------*/
        private HoverItemHighlightState FindNearestItemToCursor(CursorType pCursorType, 
            out HoverItemHighlightState.Highlight? pNearestHigh)
        {
            float minDist = float.MaxValue;
            HoverItemHighlightState nearestItem = null;

            pNearestHigh = null;

            for ( int i = 0 ; i < vHighStates.Count ; i++ ) {
                HoverItemHighlightState item = vHighStates[i];

                if ( !item.gameObject.activeInHierarchy || item.IsHighlightPrevented ) {
                    continue;
                }

                HoverItemHighlightState.Highlight? high = item.GetHighlight(pCursorType);

                if ( high == null || high.Value.Distance >= minDist ) {
                    continue;
                }

                minDist = high.Value.Distance;
                nearestItem = item;
                pNearestHigh = high;
            }

            return nearestItem;
        }
开发者ID:yonglehou,项目名称:Hover-VR-Interface-Kit,代码行数:29,代码来源:HoverItemsHighlightManager.cs

示例3: ResetCursor

    public void ResetCursor()
    {
        if (

                currentCursor != CursorType.Grip
                && Manager != null
                &&
                (
                (Manager.GetLeftHandEvent() == InteractionManager.HandEventType.Grip && Manager.IsLeftHandPrimary())
                ||
            (Manager.GetRightHandEvent() == InteractionManager.HandEventType.Grip && !Manager.IsLeftHandPrimary()))
                )
            {
                Cursor.SetCursor(gripCursor, hotSpot,
                curMode);
                currentCursor = CursorType.Grip;
            }
            else
                if ((Manager.GetLeftHandEvent() != InteractionManager.HandEventType.Grip && Manager.IsLeftHandPrimary())
                ||
            (Manager.GetRightHandEvent() != InteractionManager.HandEventType.Grip && !Manager.IsLeftHandPrimary()))
                {

                    Cursor.SetCursor(handCusor,
                                      hotSpot,
                                      curMode);
                    currentCursor = CursorType.Hand;
                }
    }
开发者ID:mfppvl,项目名称:Kinect-vs-Autism-project-CSI-2,代码行数:29,代码来源:CursorSettings.cs

示例4: GetHighlightDistance

		////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public float GetHighlightDistance(CursorType pCursorType) {
			if ( !vHighlightDistanceMap.ContainsKey(pCursorType) ) {
				return float.MaxValue;
			}

			return vHighlightDistanceMap[pCursorType];
		}
开发者ID:flashwade03,项目名称:Hover-VR-Interface-Kit,代码行数:9,代码来源:BaseItemState.cs

示例5: GetHighlightProgress

		/*--------------------------------------------------------------------------------------------*/
		public float GetHighlightProgress(CursorType pCursorType) {
			if ( !vHighlightProgressMap.ContainsKey(pCursorType) ) {
				return 0;
			}

			return vHighlightProgressMap[pCursorType];
		}
开发者ID:flashwade03,项目名称:Hover-VR-Interface-Kit,代码行数:8,代码来源:BaseItemState.cs

示例6: UIContainer

        public UIContainer(Color Colour, Color HighlightColour,
            Texture2D Texture = null, Vector2 Position = new Vector2(), Rectangle? SrcRect = null,
            int Width = UI_AUTO, int Height = UI_AUTO,
            bool IsActive = true, bool IsDraggable = false, CursorType CursorType = UI.CURSOR_DEFAULT,
            float MarginLeft = UI_AUTO, float MarginRight = UI_AUTO, float MarginTop = UI_AUTO, float MarginBottom = UI_AUTO,
            float opacity = UI_INHERIT, float layerDepth = UI_INHERIT,
            bool CentreHorizontal = false, bool CentreVertical = false,
            DragAndDropType DragAndDropType = DragAndDropType.None,
            object[] DataBinding = null)
            : base(Colour, HighlightColour, Texture, Position, SrcRect, Width, Height, IsActive, IsDraggable, CursorType, MarginLeft, MarginRight, MarginTop, MarginBottom, opacity, layerDepth)
        {
            Children = new List<UIElement>();
            this.CentreHorizontal = CentreHorizontal;
            this.CentreVertical = CentreVertical;

            this._dragAndDropType = DragAndDropType;
            if (_dragAndDropType == DragAndDropType.DropElement)
            {
                this.OnLeftReleased = OnLeftReleasedHandler;
            }

            this.DataBinding = DataBinding;
            if (this.DataBinding == null)
                this.DataBinding = new object[0];
        }
开发者ID:EoinF,项目名称:TheOtherDarkWorld,代码行数:25,代码来源:UIContainer.cs

示例7: GetFingerType

        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public static Finger.FingerType? GetFingerType(CursorType pCursorType)
        {
            switch ( pCursorType ) {
                case CursorType.LeftThumb:
                case CursorType.RightThumb:
                    return Finger.FingerType.TYPE_THUMB;

                case CursorType.LeftIndex:
                case CursorType.RightIndex:
                    return Finger.FingerType.TYPE_INDEX;

                case CursorType.LeftMiddle:
                case CursorType.RightMiddle:
                    return Finger.FingerType.TYPE_MIDDLE;

                case CursorType.LeftRing:
                case CursorType.RightRing:
                    return Finger.FingerType.TYPE_RING;

                case CursorType.LeftPinky:
                case CursorType.RightPinky:
                    return Finger.FingerType.TYPE_PINKY;

                case CursorType.LeftPalm:
                case CursorType.RightPalm:
                    return null;
            }

            throw new Exception("Unhandled CursorType: "+pCursorType);
        }
开发者ID:changjiashuai,项目名称:Hover-VR-Interface-Kit,代码行数:32,代码来源:LeapUtil.cs

示例8: FromEnum

		internal static Cursor FromEnum (CursorType type)
		{
			switch (type){
			case CursorType.Arrow:
				return Arrow;
			case CursorType.Eraser:
				return Eraser;
			case CursorType.Hand:
				return Hand;
			case CursorType.IBeam:
				return IBeam;
			case CursorType.None:
				return None;
			case CursorType.SizeNS:
				return SizeNS;
			case CursorType.SizeWE:
				return SizeWE;
			case CursorType.Stylus:
				return Stylus;
			case CursorType.Wait:
				return Wait;
			case CursorType.SizeNESW:
				return SizeNESW;
			case CursorType.SizeNWSE:
				return SizeNWSE;
			case CursorType.Default:
			default:
				return null;
			}
		}
开发者ID:dfr0,项目名称:moon,代码行数:30,代码来源:Cursors.cs

示例9: ChangeCursor

    public void ChangeCursor(CursorType type)
    {
        if (_status == CursorGestureStatus.Capturing)
        {
            //  If we're capturing a gesture, we want to keep the current icon on screen
            //  so we'll save a copy of what it SHOULD be if we weren't capturing to
            //  apply later.
            _backUpCursorType = type;
        }
        else
        {
            //  The normal type hand should use the top left as the mouse location
            //  while the others should use the middle of the icon.
            if (type != CursorType.Normal)
                _offset = _cursorDimensions * .25f;
            else
                _offset = new Vector2(10, 10);

            _activeCursorType = type;
            _cursorRect = new Rect(
                _cursorTileDimensions.x * (int)_activeCursorType,
                _cursorTileDimensions.y * (int)_status,
                _cursorTileDimensions.x,
                _cursorTileDimensions.y);
        }
    }
开发者ID:KingpinBen,项目名称:Last-Faun,代码行数:26,代码来源:CursorManager.cs

示例10: SetCursor

        public static void SetCursor(CursorType type, Form ParentForm)
        {
            if (ParentForm != null)
            {
                switch (type)
                {
                    case CursorType.WaitCursor:
                        ParentForm.Cursor = Cursors.WaitCursor;
                        break;

                    case CursorType.Default:
                        ParentForm.Cursor = Cursors.Default;
                        break;

                    case CursorType.Hand:
                        ParentForm.Cursor = Cursors.Hand;
                        break;

                    case CursorType.SizeWE:
                        ParentForm.Cursor = Cursors.SizeWE;
                        break;

                    case CursorType.Cross:
                        ParentForm.Cursor = Cursors.Cross;
                        break;

                    case CursorType.VSplit:
                        ParentForm.Cursor = Cursors.VSplit;
                        break;
                }
                CurrentCursor = type;
            }
        }
开发者ID:Riketta,项目名称:Stronghold-Kingdoms,代码行数:33,代码来源:CursorManager.cs

示例11: Cursor

	/// <summary>
	/// <para>Create a new cursor, based on a pre-defined cursor type.</para>
	/// </summary>
	///
	/// <param name="type">
	/// <para>The pre-defined cursor type to use.</para>
	/// </param>
	public Cursor(CursorType type)
			{
				this.type = type;
				this.source = null;
				this.mask = null;
				this.cursor = XCursor.Zero;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:14,代码来源:Cursor.cs

示例12: SetCusorHand1

 public void SetCusorHand1()
 {
     currentCursor = CursorType.Hand1;
     Cursor.SetCursor (
         handCusor1,
         hotSpot,
         curMode);
 }
开发者ID:mfppvl,项目名称:Kinect-vs-Autism-project-CSI-2,代码行数:8,代码来源:CursorSettings.cs

示例13: Awake

        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void Awake()
        {
            vSetup = gameObject.GetComponent<HovercursorSetup>();
            vFakeItem = new FakeItemState();
            vFakeItem.ItemAutoId = 123;

            ActiveCursorTypes = new CursorType[0];
        }
开发者ID:changjiashuai,项目名称:Hover-VR-Interface-Kit,代码行数:10,代码来源:DemoCursorToggle.cs

示例14: GetCursorDataForInput

        /*--------------------------------------------------------------------------------------------*/
        public IHoverCursorDataForInput GetCursorDataForInput(CursorType pType)
        {
            if ( !HasCursorData(pType) ) {
                throw new Exception("No '"+pType+"' cursor was found.");
            }

            return vCursorMap[pType];
        }
开发者ID:yanzhao571,项目名称:Hover-VR-Interface-Kit,代码行数:9,代码来源:HoverCursorDataProvider.cs

示例15: GetCursor

		/*--------------------------------------------------------------------------------------------*/
		public override IInputCursor GetCursor(CursorType pType) {
			if ( pType != CursorType.Look ) {
				throw new Exception("The "+typeof(HovercursorLookInput)+" component does not support "+
					"the use of "+typeof(CursorType)+"."+pType+".");
			}

			return vCursor;
		}
开发者ID:flashwade03,项目名称:Hover-VR-Interface-Kit,代码行数:9,代码来源:HovercursorLookInput.cs


注:本文中的CursorType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。