/// @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(); }
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; }
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(); }
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; } }