8.3 – Custom mouse cursor

You can easily replace the default operating system mouse cursor with any texture you want. All you have to do is to drop a texture to “Mouse cursor” property of iGUI Root. You can change the mouse cursor at runtime by assigning any Texture2D to root1.mouseCursor field.

Mouse Cursor
Mouse Cursor property is used to replace the mouse cursor with a texture.

Mouse Cursor Size
Mouse Cursor Size property is used to determine the size of mouse cursor. Can be relative (0, 2) or absolute ( >2 ). If equals to Vector2.zero, the image will be drawn with its original size.

Mouse Cursor Scale Mode
Mouse Cursor Scale Mode property is used to determine the scale mode of mouse cursor texture.

Mouse Cursor Aspect Ratio
Mouse Cursor Aspect Ratio property is used to force the aspect ratio of mouse cursor texture. If set to zero, will be ignored.

Cursor Tip Offset
Cursor Tip Offset property is used to match the tip of the cursor image with actual mouse position. Relativeness or absoluteness is determined by the relativeness of mouseCursorSize.