コード例 #1
0
ファイル: Player.cs プロジェクト: milliorn/NWN.Framework.Lite
        /// @brief Override the mouse cursor of oObject for oPlayer only
        /// @param oPlayer The player object.
        /// @param oObject The object.
        /// @param nCursor The cursor, one of MOUSECURSOR_*. -1 to clear the override.
        public static void SetObjectMouseCursorOverride(uint oPlayer, uint oObject, MouseCursorType nCursor)
        {
            Internal.NativeFunctions.nwnxSetFunction(PLUGIN_NAME, "SetObjectMouseCursorOverride");

            Internal.NativeFunctions.nwnxPushInt(nCursor.InternalValue);
            Internal.NativeFunctions.nwnxPushObject(oObject);
            Internal.NativeFunctions.nwnxPushObject(oPlayer);

            Internal.NativeFunctions.nwnxCallFunction();
        }
コード例 #2
0
    public void CursorSet(MouseCursorType type)
    {
        if (currentType == type)
        {
            return;
        }
        if ((int)type >= cursorSprite.Count)
        {
            HideCursor();
            return;
        }

        Cursor.SetCursor(cursorSprite[(int)type], hotSpot, cursorMode);
        currentType = type;
    }
コード例 #3
0
ファイル: GenericControlHelper.cs プロジェクト: pascalfr/MPfm
 public static void ChangeMouseCursor(MouseCursorType mouseCursorType)
 {
     NSCursor cursor;
     switch (mouseCursorType)
     {
         case MouseCursorType.Default:
             cursor = NSCursor.ArrowCursor;
             break;
         case MouseCursorType.HSplit:
             cursor = NSCursor.ResizeUpDownCursor;
             break;
         case MouseCursorType.VSplit:
             cursor = NSCursor.ResizeLeftRightCursor;
             break;
         default:
             throw new ArgumentOutOfRangeException();
     }
     cursor.Set();
 }
コード例 #4
0
ファイル: GenericControlHelper.cs プロジェクト: pascalfr/MPfm
 public static void ChangeMouseCursor(MouseCursorType mouseCursorType)
 {
     switch (mouseCursorType)
     {
         case MouseCursorType.Default:
             Mouse.OverrideCursor = null; // Return to default
             break;
         case MouseCursorType.HSplit:
             // TODO: Change cursor to real HSplit, not available in WPF but in Windows Forms (!?)
             Mouse.OverrideCursor = Cursors.SizeNS;
             break;
         case MouseCursorType.VSplit:
             Mouse.OverrideCursor = Cursors.SizeWE;
             break;
     }
 }