Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Wed Apr 08, 2009 10:12 am Post subject: |
|
|
Quote: |
float(float event, float parama, float paramb) CSQC_InputEvent;
event is one of: 0:key pressed, 1:key released, 2:mouse move.
mouse movement is not yet notified. Call getmousepos to find where the cursor currently is.
This is called if setwantskeys was last called with the parameter true.
This func returns a value. "false" signalize that engine *should* take care of the keypress, a return value of true will make the engine otherwise ignore the event ever happened. This helps to use only keys that are really needed.
With keyboard events, parama is set to the keycode. The key values are as in the menu.dat (and DarkPlaces), and consistant between engines.
With mouse movement events, parama contains the X motion of the mouse, while paramb contains the Y motion of the mouse.
|
I'm not sure how sustainable that is.
Tbh I've no idea. My original docs don't describe any more.
If I were to design it now I'd probably make mouse events always go through InputEvent, and allow getmousepos only when explicitly enabled (thereby releasing the cursor in windowed mode, but leaving it invisible).
DP probably does it some other way.
I really can't remember how FTE works here: 'mouse movement is not yet notified' is likely still true, unfortunatly. _________________ What's a signature? |
|