.. Generated automatically by doc/tools/makerst.py in Mole's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_InputEventScreenDrag: InputEventScreenDrag ==================== **Category:** Built-In Types Brief Description ----------------- Built-in input event type for screen drag events. Member Functions ---------------- +--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | +--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` action **)** | +--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` action **)** | +--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_echo` **(** **)** | +--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_pressed` **(** **)** | +--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | +--------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- - :ref:`int` **ID** - Event identifier, positive integer increased at each new event. - :ref:`int` **device** - Device identifier. - :ref:`int` **index** - Drag event index in the case of a multi-drag event. - :ref:`Vector2` **pos** - Position of the drag event. - :ref:`Vector2` **relative_pos** - Position of the drag event relative to its start position. - :ref:`float` **relative_x** - X coordinate of the drag event relative to its start position. - :ref:`float` **relative_y** - Y coordinate of the drag event relative to its start position. - :ref:`Vector2` **speed** - Speed of the drag event. - :ref:`float` **speed_x** - Speed of the drag event on the X axis. - :ref:`float` **speed_y** - Speed of the drag event on the Y axis. - :ref:`int` **type** - Type of event (one of the [InputEvent] constants). - :ref:`float` **x** - X coordinate of the drag event. - :ref:`float` **y** - Y coordinate of the drag event. Numeric Constants ----------------- - **NONE** = **0** --- Empty input event. - **KEY** = **1** --- Key event. - **MOUSE_MOTION** = **2** --- Mouse motion event. - **MOUSE_BUTTON** = **3** --- Mouse button event. - **JOYSTICK_MOTION** = **4** --- Joystick motion event. - **JOYSTICK_BUTTON** = **5** --- Joystick button event. - **SCREEN_TOUCH** = **6** --- Screen touch event. - **SCREEN_DRAG** = **7** --- Screen drag event. - **ACTION** = **8** --- Pre-defined action event (see :ref:`InputMap`). Description ----------- Input event type for screen drag events that extends the global :ref:`InputEvent` type. Member Function Description --------------------------- .. _class_InputEventScreenDrag_is_action: - :ref:`bool` **is_action** **(** :ref:`String` action **)** Return if this input event matches a pre-defined action. .. _class_InputEventScreenDrag_is_action_pressed: - :ref:`bool` **is_action_pressed** **(** :ref:`String` action **)** Return whether the given action is being pressed. Not relevant for SCREEN_DRAG events, always false. .. _class_InputEventScreenDrag_is_action_released: - :ref:`bool` **is_action_released** **(** :ref:`String` action **)** Return whether the given action is released (i.e. not pressed). Not relevant for SCREEN_DRAG events, can be true or false depending on whether :ref:`is_action` is true. .. _class_InputEventScreenDrag_is_echo: - :ref:`bool` **is_echo** **(** **)** Return if this input event is an echo event (only for events of type KEY, i.e. always false for this type). .. _class_InputEventScreenDrag_is_pressed: - :ref:`bool` **is_pressed** **(** **)** Return if this input event is pressed. Not relevant for SCREEN_DRAG events, always false. .. _class_InputEventScreenDrag_set_as_action: - void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** Change the input event to an action event of the given name with the (irrelevant for this type) pressed status passed as argument.