Carved Marker

Creating Cursors

Wormouse uses its own cursor files. Therefore, there are built-in tools for creating and editing these cursor files. To support alpha blending, Wormouse uses PNG files for cursor images. If you want to create your own cursor image, you need to use a program which can save transparent PNG files, such as Adobe® Photoshop®, The GIMP, and many others.

Creating Rotation Cursors

Rotation cursor is the reason why this program exists in the first place. It is also very simple to create a rotation cursor.

To create a rotation cursor, click the "Create Cursor" button first. A "Select Cursor Type" dialog appears, choose "Rotation" and click "Next."

Select Cursor Type

Now you can see the "Rotation Cursor Editor" window:

Rotation Cursor Editor

Click "Load Image" button to load your cursor image (which has to be a PNG file with alpha channel). The cursor image has to be square and adequate size (16x16, 32x32, 48x48, 64x64, or 96x96 are the best sizes). For most systems 32x32 is the most efficient size. If the image is successfully loaded, it will be shown in the box.

Now, click on the image to set the hot spot position. When the mouse is clicked, it is actually clicked on the hot spot position. It is very important for rotation cursors that hot spot must not be too near the center of the image, because the angle of the image is determined from the position of the hot spot. When you clicked on the image, the coordinate will be filled in the X and Y fields. If you already know the coordinate of the hot spot, you can also input directly in the two fields, which can be more precise then clicking on the image.

When you are done, click on the "Next" button to save the cursor into a Wormouse cursor file (*.wmc). You'll be able to use this cursor in your scheme.

IMPORTANT: the cursor file includes all image data it needs. The original PNG file is not required for the cursor file to work. However, it is not possible to extract the image data from a Wormouse cursor file in this version. So you may want to keep these PNG files just in case.

See an example here

Creating Animated Cursors

Rotation cursors are not suitable for every situation. Therefore, Wormouse also support animated cursors. Wormouse does not support normal still image cursors directly, you can use a single frame animated cursors for these cursors.

Just like creating rotation cursors, the first step for creating animated cursors is to click the "Create Cursor" button. In the "Select Cursor Type" dialog box, choose "Animated" and click "Next."

Select Cursor Type

Now you can see the "Animated Cursor Editor" window.

Animated Cursor Editor

This editor is a bit more complex than the "Rotation Cursor Editor." Just like the "Rotation Cursor Editor", there is a preview box in the top left of the window. In the right a box lists all frames you have imported for this cursor. The hot spot field works the same as in the "Rotation Cursor Editor."

Now you can import your PNG images for each frames by clicking the "Import Images" button. You can choose multiple files in the file dialog box. The imported images are listed in the right box, with a predefined frame number. The image size of all frames has to be the same, and they share the same restriction as in rotation cursors (sqaure, better be 16x16, 32x32, 48x48, 64x64, or 96x96). 32x32 is the best size in most systems.

This picture shows an "Animated Cursor Editor" with several images loaded.

Image loaded

If you want to remove any image from the list box, select it first, and click "Remove Image" button. The image will be removed from the list after confirmation. You can also select multiple images and remove all of them at once.

In Wormouse, animated cursor works at 20 frames per second, which is pretty fast. Sometimes you may want a lower frame rate. For example, a 4 frames per second is probably enough for a 4 frames animated cursor (which takes one second to show all frames). In this case, you will want to modify the frame number of each image. For our example, the frame number for each image will be 1, 6, 11, and 16. Note that the first image always has frame number "1", no matter how you modify it. To make the animated cursor runs full 20 frames, you need to import the fourth image again, and assign its frame number to "20."

Frame number assigned

To change the frame number of an image, select it, change the frame number in the "Frame #" box, and click "Set" button. It is not possible to set frame number if there is already another image with the same frame number. So you may need to remove the conflicting image, or change its frame number first.

By default, the "Preview Animation" option is checked. The current animation defined by the image box will repeat endlessly in the preview box. If you want to preview a single frame, uncheck the "Preview Animation" option, and select the image you want to see. The selected image will be displayed in the preview box. To preview the whole animation again, just check the "Preview Animation" option.

Preview single frame

Like rotation cursors, animated cursors need a hot spot. Click on the preview box to set the hot spot position, or just input the coordinate in the fields. It is pretty similar to the "Rotation Cursor Editor."

When all set, click the "Next" button, and save the cursor to a Wormouse cursor file (*.wmc).

See an example here

Editing Cursors

It is possible to edit a saved Wormouse cursor file. Click the "Edit Cursor" button in the main window, and choose the cursor file you want to edit, the corresponding cursor editor window will be displayed. Then, it just works like creating cursors, with all images, frame numbers (for animated cursors), and hot spot positions set already. After editing, you can save it to a new file (or the original file) by clicking the "OK" button.

Copyright © 2003, 2004 Ping-Che Chen (e-mail: hotball.chen 'at' msa.hinet.net)