# SPL Module Reference: multimouse

load "multimouse";

    This module provides a simple way to access the Linux /dev/input/mouse*
    devices. It has been written for multiplayer games where every player has
    his own mouse.

builtin multimouse_update();

namespace multimouse { }

builtin multimouse_update();

    This function updates the data stored in the multimouse namespace.

namespace multimouse

    This namespace holds the status information of all mice. It is an array
    of hashes with one array elements per mouse and one hash entry per property.

    E.g. the variable 'multimouse[3].b1' has the value '1' if the left (first)
    mouse button of the 4th mouse (the array starts with index 0) is pressed.

    The following properies are implemented:

    	b1, b2
    		Left and right mouse button

    	dx, dy
    		X- and Y-delta for all mousemovement between the last
    		call to multimouse_update() and the call before the
    		last one.

    	x, y
    		X- and Y-coordinates of the current mouse position.

    	mx, my
    		The maximum X- and Y-coordinates. This variables must
    		be set before the variables x and y can be used.

    	ob1, ob2, ox, oy
    		The old values of b1, b2, x and y before the last call to
    		multimouse_update().

    	direction
    		The view-point of the player. Possible values are 'bottom',
    		'top', 'left' and 'right'. The default value is 'bottom'.

    	error
    		This variable is defined when an error occured while opening
    		the mouse device and is set to the error string.

    The 'error' variable is read-only. All the other variables are read- and
    writeable.

Generated by SPLDOC. | http://www.clifford.at/spl/