Create a new inputarea.
Create a new inputarea. An inputarea is a spot on the screen that will respond to mouse/joystick buttons when the cursor is within its borders. The LUI system uses this for its gadgets.
Freeing an inputarea is a simple matter of removing it from its list and calling iarea_free().
- Data to pass on to the hook functions.
- Left mousebutton hook.
- Middle mousebutton hook.
- Right mousebutton hook.
- Pass-over hook. Called when no mousebuttons are pressed.
- A mask of controllers to respond to. The choices are:
- Ordinary mouse, two or three buttons (unless you suffer from a Mac).
- Sticks and pads may break my code. Not implemented yet.
- Mask of mousebuttons to respond to.
- Mask of joybuttons to respond to. Note that only eight bits are available. Since joystick support hasn't been written yet, this will probably be expanded to include hats, too. And we could always hope that Z axis and throttle makes its way into the code..
- IA_XPOS, IA_YPOS
- Position of upper left corner of this inputarea.
- IA_WIDTH, IA_HEIGHT
- Size of this inputarea. Clicks/pass-over functions are not called outside its limits. Beware of overlapping regions. No effort will be made to handle overlaps.
- Optional name.
- Identifier returned by iarea_check() when the inputarea matches.
- Milliseconds to delay before allowing an inputarea to be clicked again. If less than this number of milliseconds have passed since clicking a button, iarea_check() returns zero. SDL_GetTicks() is called to get current ticks iff this tag has been specified.