mouse_mode
Activates the engine's internal mouse pointer (mouse_map),
and
lets panels and entities react on the mouse.
Range:
0 - mouse pointer inactive / mouse_force is
changed by mouse movement (default).
1 - mouse pointer active / mouse_force is
also changed by mouse movement.
2 - mouse pointer active / mouse_force is
not changed by mouse movement.
4 -
mouse pointer active and automatically moved / mouse_force is
not changed by mouse movement.
Type:
var
Remarks:
-
If this variable is set at 1 or above, the internal mouse pointer image mouse_map becomes
visible within the engine window, and the normal windows mouse pointer
is invisible over the engine window and its title bar (unless the
mouse_pointer variable is set).
-
If set at 2 or above, mouse movements don't change
the mouse_force variable,
allowing the mouse pointer to be moved independently from player
movement.
-
If set at 4, the mouse position (mouse_pos)
is automatically moved with the mouse. Below 4 it can be moved
by a script function.
-
If the mouse pointer is active and within an active VIEW
window, additional computing power is
needed to detect entities touched by the mouse, which can influence
the frame rate.
Example:
BMAP* arrow = "arrow.pcx";
function mouse_toggle() // switches the mouse on and off
{
mouse_map = arrow; // use arrow as mouse pointer
if (mouse_mode >= 2) { // was it already on?
mouse_mode = 0;
} else {
mouse_mode = 2;
}
while (mouse_mode > 0) // move it over the screen
{
vec_set(mouse_pos,mouse_cursor);
wait(1);
}
}
See also:
mouse_pos, mouse_map, mouse_spot, mickey, mouse_cursor, mouse_range, mouse_moving, mouse_calm, mouse_time, mouse_left, mouse_ent, mouse_force, mouse_pointer,
mouse_dir3d
► latest
version online