This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine::InputEvent Class

Header: #include <UnigineInput.h>

InputEvent Class

Enums

TYPE#

NameDescription
INPUT_EVENT = 0Basic type. Cannot be created.
INPUT_EVENT_MOUSE_BUTTON = 1Mouse button has been clicked.
INPUT_EVENT_MOUSE_WHEEL = 2Mouse wheel has been moved.
INPUT_EVENT_MOUSE_MOTION = 3Mouse has been moved.
INPUT_EVENT_KEYBOARD = 4Keyboard button has been pressed.
INPUT_EVENT_TEXT = 5Text has been entered.
INPUT_EVENT_TOUCH = 6
INPUT_EVENT_JOY_DEVICE = 7
INPUT_EVENT_JOY_BUTTON = 8
INPUT_EVENT_JOY_AXIS_MOTION = 9
INPUT_EVENT_JOY_POV_MOTION = 10
INPUT_EVENT_PAD_DEVICE = 11
INPUT_EVENT_PAD_BUTTON = 12
INPUT_EVENT_PAD_AXIS_MOTION = 13
NUM_INPUT_EVENTS = 14Counter of input events.

Members


InputEvent::TYPE getType ( ) const#

Returns the type of the input event.

Return value

Type of the input event, one of the TYPE.INPUT_EVENT values.

const char * getTypeName ( ) const#

Returns the name of the input event type.

Return value

Name of the input event type.

void setTimestamp ( unsigned int timestamp ) #

Sets the timestamp of the event.

Arguments

  • unsigned int timestamp - Timestamp of the event, in milliseconds.

unsigned int getTimestamp ( ) const#

Returns the timestamp of the event.

Return value

Timestamp of the event, in milliseconds.

void setMousePos ( const Math::ivec2 & pos ) #

Sets the mouse position for the event.

Arguments

  • const Math::ivec2 & pos - Position of the mouse.

Math::ivec2 getMousePos ( ) const#

Returns the mouse position for the event.

Return value

Position of the mouse.

Ptr<InputEventMouseButton> getMouseButton ( ) const#

Returns the action cast to an inherited event.

Return value

Mouse button input event.

Ptr<InputEventMouseWheel> getMouseWheel ( ) const#

Returns the action cast to an inherited event.

Return value

Mouse wheel input event.

Ptr<InputEventMouseMotion> getMouseMotion ( ) const#

Returns the action cast to an inherited event.

Return value

Mouse motion input event.

Ptr<InputEventKeyboard> getKeyboard ( ) const#

Returns the action cast to an inherited event.

Return value

Keyboard input event.

Ptr<InputEventText> getText ( ) const#

Returns the action cast to an inherited event.

Return value

Text input event.

Ptr<InputEventTouch> getTouch ( ) const#

Ptr<InputEventJoyDevice> getJoyDevice ( ) const#

Ptr<InputEventJoyButton> getJoyButton ( ) const#

Ptr<InputEventJoyAxisMotion> getJoyAxisMotion ( ) const#

Ptr<InputEventJoyPovMotion> getJoyPovMotion ( ) const#

Ptr<InputEventPadDevice> getPadDevice ( ) const#

Ptr<InputEventPadButton> getPadButton ( ) const#

Ptr<InputEventPadAxisMotion> getPadAxisMotion ( ) const#

Last update: 2022-08-08
Build: ()