UFO: Alien Invasion
|
External (non-keyboard) input devices. More...
Go to the source code of this file.
Macros | |
#define | STATE_FORWARD 1 |
#define | STATE_RIGHT 2 |
#define | STATE_ZOOM 3 |
#define | STATE_ROT 4 |
#define | STATE_TILT 5 |
#define | IN_GetMouseSpace() mouseSpace |
Enumerations | |
enum | mouseSpace_t { MS_NULL, MS_UI, MS_WORLD, MS_MAX } |
Functions | |
void | IN_Init (void) |
void | IN_Frame (void) |
Handle input events like key presses and joystick movement as well as window events. More... | |
void | IN_SendKeyEvents (void) |
void | IN_SetMouseSpace (mouseSpace_t mouseSpace) |
void | IN_EventEnqueue (unsigned int key, unsigned short, bool down) |
float | CL_GetKeyMouseState (int dir) |
Variables | |
mouseSpace_t | mouseSpace |
int | mousePosX |
int | mousePosY |
External (non-keyboard) input devices.
Definition in file cl_input.h.
#define IN_GetMouseSpace | ( | ) | mouseSpace |
Definition at line 48 of file cl_input.h.
Referenced by 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(), HUD_UpdateActor(), IN_PanTiltDown_f(), Key_Event(), SCR_DrawCursor(), and UI_FocusNextActionNode().
#define STATE_FORWARD 1 |
Definition at line 39 of file cl_input.h.
Referenced by CL_CameraMove(), and CL_GetKeyMouseState().
#define STATE_RIGHT 2 |
Definition at line 40 of file cl_input.h.
Referenced by CL_CameraMove(), and CL_GetKeyMouseState().
#define STATE_ROT 4 |
Definition at line 42 of file cl_input.h.
Referenced by CL_CameraMove(), and CL_GetKeyMouseState().
#define STATE_TILT 5 |
Definition at line 43 of file cl_input.h.
Referenced by CL_CameraMove(), and CL_GetKeyMouseState().
#define STATE_ZOOM 3 |
Definition at line 41 of file cl_input.h.
Referenced by CL_CameraMove(), and CL_GetKeyMouseState().
enum mouseSpace_t |
Enumerator | |
---|---|
MS_NULL | |
MS_UI |
we are over some menu node |
MS_WORLD |
we are in tactical mode |
MS_MAX |
Definition at line 31 of file cl_input.h.
float CL_GetKeyMouseState | ( | int | dir | ) |
Definition at line 546 of file cl_input.cpp.
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().
Definition at line 905 of file cl_input.cpp.
References Com_Printf(), cvar_s::integer, Key_KeynumToString(), keyDown, keyq, keyq_head, and MAX_KEYQ.
Referenced by CL_PressKey_f(), IN_Frame(), and IN_JoystickMove().
Handle input events like key presses and joystick movement as well as window events.
Definition at line 946 of file cl_input.cpp.
References CL_ProcessMouseDragging(), cls, Cmd_ExecuteString(), Com_Printf(), Con_ToggleConsole_f(), Cvar_SetValue(), IN_EventEnqueue(), IN_JoystickMove(), IN_Parse(), IN_PrintKey(), IN_ToggleFullscreen(), 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, R_ReinitOpenglContext(), viddef_t::rx, viddef_t::ry, UI_ReleaseInput(), unicode, UTF8_next(), vid_fullscreen, vid_grabmouse, vid_mode, and viddef.
Referenced by CL_Frame().
Definition at line 1212 of file cl_input.cpp.
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_PressKey_f(), CL_RightClickDown_f(), CL_RightClickUp_f(), CL_SelectDown_f(), CL_SelectUp_f(), CL_TurnDown_f(), CL_TurnUp_f(), CL_WheelDown_f(), CL_WheelUp_f(), CL_ZoomInQuant_f(), CL_ZoomOutQuant_f(), Cmd_AddCommand(), Com_Printf(), CVAR_ARCHIVE, Cvar_Get(), IN_PanTiltDown_f(), IN_PanTiltUp_f(), IN_ShiftDownDown_f(), IN_ShiftDownUp_f(), IN_ShiftLeftDown_f(), IN_ShiftLeftDownDown_f(), IN_ShiftLeftDownUp_f(), IN_ShiftLeftUp_f(), IN_ShiftLeftUpDown_f(), IN_ShiftLeftUpUp_f(), IN_ShiftRightDown_f(), IN_ShiftRightDownDown_f(), IN_ShiftRightDownUp_f(), IN_ShiftRightUp_f(), IN_ShiftRightUpDown_f(), IN_ShiftRightUpUp_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, mousePosY, and N_.
Referenced by CL_InitLocal().
Definition at line 1284 of file cl_input.cpp.
References CL_Milliseconds(), down, key, Key_Event(), keyq, keyq_head, keyq_tail, MAX_KEYQ, and unicode.
Referenced by CL_SendCommand().
void IN_SetMouseSpace | ( | mouseSpace_t | mouseSpace | ) |
Definition at line 1195 of file cl_input.cpp.
References cursorChange_s::cursor, Cvar_GetValue(), mouseSpace, MS_NULL, cursorChange_s::prevSpace, and SCR_ChangeCursor().
Referenced by CL_ActionUp_f(), CL_ActorUseHeadgear_f(), CL_SelectUp_f(), CL_TurnUp_f(), and IN_Parse().
int mousePosX |
Definition at line 80 of file cl_input.cpp.
Referenced by CL_GetKeyMouseState(), CL_GetWorldCoordsUnderMouse(), CL_LeftClickDown_f(), CL_LeftClickUp_f(), CL_MiddleClickDown_f(), CL_MiddleClickUp_f(), CL_ProcessMouseDragging(), CL_RightClickDown_f(), CL_RightClickUp_f(), CL_SelectDown_f(), uiVScrollbarNode::draw(), uiTabNode::draw(), uiSpinnerNode::draw(), uiEditorNode::drawOverWindow(), HUD_DrawMouseCursorText(), HUD_UpdateCursor(), IN_Frame(), IN_Init(), IN_JoystickMove(), uiGeoscapeNode::onCapturedMouseMove(), uiContainerNode::onDndMove(), uiEditorNode::onMouseDown(), SCR_DrawCursor(), UI_CheckMouseMove(), UI_DNDDrop(), UI_Draw(), UI_DrawCursor(), UI_DrawDragAndDrop(), and UI_PushDropDownWindow_f().
int mousePosY |
Definition at line 80 of file cl_input.cpp.
Referenced by CL_GetKeyMouseState(), CL_GetWorldCoordsUnderMouse(), CL_LeftClickDown_f(), CL_LeftClickUp_f(), CL_MiddleClickDown_f(), CL_MiddleClickUp_f(), CL_ProcessMouseDragging(), CL_RightClickDown_f(), CL_RightClickUp_f(), CL_SelectDown_f(), uiVScrollbarNode::draw(), uiTabNode::draw(), uiSpinnerNode::draw(), uiEditorNode::drawOverWindow(), HUD_DrawMouseCursorText(), HUD_UpdateCursor(), IN_Frame(), IN_Init(), IN_JoystickMove(), uiGeoscapeNode::onCapturedMouseMove(), uiContainerNode::onDndMove(), uiEditorNode::onMouseDown(), SCR_DrawCursor(), UI_CheckMouseMove(), UI_DNDDrop(), UI_Draw(), UI_DrawCursor(), UI_DrawDragAndDrop(), UI_PushDropDownWindow_f(), and UI_VScrollbarNodeAction().
mouseSpace_t mouseSpace |
Definition at line 79 of file cl_input.cpp.
Referenced by IN_SetMouseSpace().