External (non-keyboard) input devices. More...
Go to the source code of this file.
Defines | |
#define | STATE_FORWARD 1 |
#define | STATE_RIGHT 2 |
#define | STATE_ZOOM 3 |
#define | STATE_ROT 4 |
#define | STATE_TILT 5 |
Enumerations | |
enum | mouseSpace_t { MS_NULL, MS_UI, MS_WORLD } |
enum | keydest_t { key_game, key_console, key_message } |
Functions | |
void | IN_Init (void) |
void | IN_Frame (void) |
Handle input events like keys presses and joystick movement as well as window events. | |
void | IN_SendKeyEvents (void) |
void | IN_EventEnqueue (unsigned int key, unsigned short, qboolean down) |
float | CL_GetKeyMouseState (int dir) |
Variables | |
int | mouseSpace |
int | mousePosX |
int | mousePosY |
External (non-keyboard) input devices.
Definition in file cl_input.h.
#define STATE_FORWARD 1 |
Definition at line 44 of file cl_input.h.
Referenced by CL_CameraMove(), and CL_GetKeyMouseState().
#define STATE_RIGHT 2 |
Definition at line 45 of file cl_input.h.
Referenced by CL_CameraMove(), and CL_GetKeyMouseState().
#define STATE_ROT 4 |
Definition at line 47 of file cl_input.h.
Referenced by CL_CameraMove(), and CL_GetKeyMouseState().
#define STATE_TILT 5 |
Definition at line 48 of file cl_input.h.
Referenced by CL_CameraMove(), and CL_GetKeyMouseState().
#define STATE_ZOOM 3 |
Definition at line 46 of file cl_input.h.
Referenced by CL_CameraMove(), and CL_GetKeyMouseState().
enum keydest_t |
key_game |
input focus is on the menu (or the keyBindings) |
key_console |
console is opened |
key_message |
chatting |
Definition at line 38 of file cl_input.h.
enum mouseSpace_t |
Definition at line 32 of file cl_input.h.
float CL_GetKeyMouseState | ( | int | dir | ) |
Definition at line 444 of file cl_input.c.
References MOUSE_PITCH_SCALE, MOUSE_YAW_SCALE, mousePosX, mousePosY, oldMousePosX, oldMousePosY, viddef_t::rx, viddef_t::ry, SCROLL_BORDER, kbutton_t::state, STATE_FORWARD, STATE_RIGHT, STATE_ROT, STATE_TILT, STATE_ZOOM, viddef, viddef_t::viewHeight, viddef_t::viewWidth, viddef_t::x, and viddef_t::y.
Referenced by CL_CameraMove().
void IN_EventEnqueue | ( | unsigned int | key, | |
unsigned | short, | |||
qboolean | down | |||
) |
Definition at line 740 of file cl_input.c.
References Com_Printf(), cvar_s::integer, Key_KeynumToString(), keyq, keyq_head, and MAX_KEYQ.
Referenced by IN_Frame(), and IN_JoystickMove().
void IN_Frame | ( | void | ) |
Handle input events like keys presses and joystick movement as well as window events.
Definition at line 759 of file cl_input.c.
References Cmd_ExecuteString(), Com_Printf(), Con_ToggleConsole_f(), Cvar_SetValue(), IN_EventEnqueue(), IN_JoystickMove(), IN_Parse(), IN_PrintKey(), IN_TranslateKey(), cvar_s::integer, K_AUX1, K_MOUSE1, K_MOUSE2, K_MOUSE3, K_MOUSE4, K_MOUSE5, K_MWHEELDOWN, K_MWHEELUP, key, cvar_s::modified, mousePosX, mousePosY, oldMousePosX, oldMousePosY, qfalse, qtrue, viddef_t::rx, viddef_t::ry, kbutton_t::state, UI_ReleaseInput(), unicode, vid_fullscreen, vid_grabmouse, vid_mode, and viddef.
Referenced by CL_Frame().
void IN_Init | ( | void | ) |
Definition at line 905 of file cl_input.c.
References _, CL_ActionDown_f(), CL_ActionUp_f(), CL_HudRadarDown_f(), CL_HudRadarUp_f(), CL_LeftClickDown_f(), CL_LeftClickUp_f(), CL_LevelDown_f(), CL_LevelUp_f(), CL_MiddleClickDown_f(), CL_MiddleClickUp_f(), CL_RightClickDown_f(), CL_RightClickUp_f(), CL_SelectDown_f(), CL_SelectUp_f(), CL_TurnDown_f(), CL_TurnUp_f(), CL_ZoomInQuant_f(), CL_ZoomOutQuant_f(), Cmd_AddCommand(), Com_Printf(), CVAR_ARCHIVE, Cvar_Get(), IN_ShiftDownDown_f(), IN_ShiftDownUp_f(), IN_ShiftLeftDown_f(), IN_ShiftLeftUp_f(), IN_ShiftRightDown_f(), IN_ShiftRightUp_f(), IN_ShiftUpDown_f(), IN_ShiftUpUp_f(), IN_StartupJoystick(), IN_TurnDownDown_f(), IN_TurnDownUp_f(), IN_TurnLeftDown_f(), IN_TurnLeftUp_f(), IN_TurnRightDown_f(), IN_TurnRightUp_f(), IN_TurnUpDown_f(), IN_TurnUpUp_f(), IN_ZoomInDown_f(), IN_ZoomInUp_f(), IN_ZoomOutDown_f(), IN_ZoomOutUp_f(), mousePosX, and mousePosY.
Referenced by CL_InitLocal().
void IN_SendKeyEvents | ( | void | ) |
Definition at line 963 of file cl_input.c.
References CL_Milliseconds(), down, key, Key_Event(), keyq, keyq_head, keyq_tail, MAX_KEYQ, and unicode.
Referenced by CL_SendCommand(), and CL_ViewLoadMedia().
int mousePosX |
Definition at line 73 of file cl_input.c.
Referenced by CL_ActorMouseTrace(), CL_GetKeyMouseState(), CL_LeftClickDown_f(), CL_LeftClickUp_f(), CL_MiddleClickDown_f(), CL_MiddleClickUp_f(), CL_RightClickDown_f(), CL_RightClickUp_f(), CL_ZoomInQuant_f(), CL_ZoomOutQuant_f(), HUD_DrawMouseCursorText(), HUD_UpdateCursor(), IN_Frame(), IN_Init(), IN_JoystickMove(), SCR_DrawCursor(), UI_BaseMapNodeDraw(), UI_CheckMouseMove(), UI_ContainerNodeDNDMove(), UI_DNDDrop(), UI_Draw(), UI_DrawCursor(), UI_EditorNodeDrawOverWindow(), UI_EditorNodeMouseDown(), UI_MapNodeCapturedMouseMove(), UI_PushDropDownWindow_f(), UI_TabNodeDraw(), UI_TodoNodeDrawOverWindow(), and UI_VScrollbarNodeDraw().
int mousePosY |
Definition at line 73 of file cl_input.c.
Referenced by CL_ActorMouseTrace(), CL_GetKeyMouseState(), CL_LeftClickDown_f(), CL_LeftClickUp_f(), CL_MiddleClickDown_f(), CL_MiddleClickUp_f(), CL_RightClickDown_f(), CL_RightClickUp_f(), CL_ZoomInQuant_f(), CL_ZoomOutQuant_f(), HUD_DrawMouseCursorText(), HUD_UpdateCursor(), IN_Frame(), IN_Init(), IN_JoystickMove(), SCR_DrawCursor(), UI_BaseMapNodeDraw(), UI_CheckMouseMove(), UI_ContainerNodeDNDMove(), UI_DNDDrop(), UI_Draw(), UI_DrawCursor(), UI_EditorNodeDrawOverWindow(), UI_EditorNodeMouseDown(), UI_MapNodeCapturedMouseMove(), UI_PushDropDownWindow_f(), UI_SpinnerNodeDraw(), UI_TabNodeDraw(), UI_TodoNodeDrawOverWindow(), UI_VScrollbarNodeAction(), and UI_VScrollbarNodeDraw().
int mouseSpace |
Definition at line 72 of file cl_input.c.
Referenced by CL_ActionDown_f(), CL_ActionUp_f(), CL_ActorActionMouse(), CL_ActorSelectMouse(), CL_ActorShoot(), CL_ActorStartMove(), CL_ActorTurnMouse(), CL_ActorUseHeadgear_f(), CL_AddTargeting(), CL_LeftClickDown_f(), CL_LeftClickUp_f(), CL_MiddleClickDown_f(), CL_MiddleClickUp_f(), CL_RightClickDown_f(), CL_RightClickUp_f(), CL_SelectDown_f(), CL_SelectUp_f(), CL_TurnDown_f(), CL_TurnUp_f(), CL_ZoomInQuant_f(), CL_ZoomOutQuant_f(), HUD_UpdateActor(), IN_Parse(), Key_Event(), SCR_DrawCursor(), and UI_FocusNextActionNode().