Skip to content

Customizing the Cursor Icons

EliotVU edited this page Mar 8, 2013 · 1 revision

This brief tutorial explains the several steps it takes to customize the cursor icons used throughout Forms.

The DefaultForms.ini makes it possible to edit the cursor's size and icons(Standard and Hover).

Changing the cursor's Icons

Note: This assumes you've already have cursor icons available and imported into an .UPK file as a Texture2D, if not and you are confused what the requirements are then read on anyway as I will explain the expectations of Forms.

Navigate to

...\UDK\YOUR-GAME\UDKGame\Config
and open DefaultForms.ini, if you don't have this file then you've probably forgotten to install Forms.

Look for section

[Forms FScene]

and modify the following variable named CursorsImageName. CursorsImageName expects a reference to an image containing more than one cursor icon such as the default and hover state icon, for example:

Texture2D'GameUI.Cursors.Cursor_PointAndTouch'

Cursor_PointAndTouch is a texture that contains two icons, the default and hover state and is of type Texture2D it also transparent which is accomplished by setting its material type to user interface(UI).

Coordinates

Forms will search this texture for either one of the icons upon launch, it is important that you tell Forms which partition of the texture is which icon, there are two configurable variables for this named: CursorPointCoords and CursorTouchCoords, where CursorPointCoords is the default state's icon and CursorTouchCoords is the hover state's icon.

As you probably already know or noticed, both variables are of type Coordinates and thus expect four values whom are U, V, UL, and VL.

U is the X start position of where the icon is located, V is the Y start position, UL is the width and VL is the height of the icon.

Configure all those four variables for each cursor state and you are basically done, the only thing is left to test and adjust the icon's size by modifying the cursor's size scaling which goes by the name of CursorScaling.

I hope you've understood everything! Comment below if run into any issue not explained here.

Clone this wiki locally