• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# CursorType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: InventoryElement

 public InventoryElement(Texture2D Texture = null, Vector2 Position = new Vector2(),
     Item Item = null,
     bool IsActive = true, CursorType CursorType = UI.CURSOR_DEFAULT,
     float opacity = UI_INHERIT)
     : base(Color.White, Color.Orange, Texture, Position, null, UI_INHERIT, UI_INHERIT, IsActive, true, CursorType, opacity: opacity)
 {
     this.Item = Item;
     this.Texture = Texture;
 }
开发者ID:EoinF,项目名称:TheOtherDarkWorld,代码行数:9,代码来源:InventoryElement.cs


示例17: Contains

		/*--------------------------------------------------------------------------------------------*/
		public static bool Contains(IList<CursorType> pList, CursorType pType) {
			for ( int i = 0 ; i < pList.Count ; i++ ) {
				if ( pList[i] == pType ) {
					return true;
				}
			}

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


示例18: IsPalm

		/*--------------------------------------------------------------------------------------------*/
		public static bool IsPalm(CursorType pCursorType) {
			switch ( pCursorType ) {
				case CursorType.LeftPalm:
				case CursorType.RightPalm:
					return true;
			}

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


示例19: HasCursorData

        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public bool HasCursorData(CursorType pType)
        {
            if ( vCursorMap.Count == 0 ) {
                Update();
                //Debug.Log("Early cursor request. Found "+vCursorMap.Count+" cursor(s).");
            }

            return vCursorMap.ContainsKey(pType);
        }
开发者ID:yonglehou,项目名称:Hover-VR-Interface-Kit,代码行数:11,代码来源:HoverCursorDataProvider.cs


示例20: SetCursor

        public void SetCursor(CursorType type)
        {
            if (type == CurrentCursor) { return; }

            if (m_CursorMap.ContainsKey(type))
            {
                CurrentCursor = type;
                Form winForm = (Form)Form.FromHandle(this.Window.Handle);
                winForm.Cursor = m_CursorMap[type];
            }
        }
开发者ID:Blayer98,项目名称:Project-Dollhouse,代码行数:11,代码来源:CursorManager.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CurtDevDataContext类代码示例发布时间:2022-05-24
下一篇:
C# Cursor类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap