parent
5b039245b9
commit
f6ae5e41de
|
@ -15031,8 +15031,10 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||
</class>
|
||||
<class name="Input" inherits="Object" category="Core">
|
||||
<brief_description>
|
||||
A Singleton that deals with inputs.
|
||||
</brief_description>
|
||||
<description>
|
||||
A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joysticks, and input actions.
|
||||
</description>
|
||||
<methods>
|
||||
<method name="is_key_pressed">
|
||||
|
@ -15041,6 +15043,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||
<argument index="0" name="scancode" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns true or false depending on whether the key is pressed or not. You can pass KEY_*, which are pre-defined constants listed in [@Global Scope].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_mouse_button_pressed">
|
||||
|
@ -15069,6 +15072,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||
<argument index="0" name="action" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
Returns true or false depending on whether the action event is pressed. Actions and their events can be set in the Project Settings / Input Map tab. Or be set with [InputMap].
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_joy_mapping">
|
||||
|
@ -15129,48 +15133,56 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||
<return type="Vector3">
|
||||
</return>
|
||||
<description>
|
||||
If the device has an accelerometer, this will return the movement.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_mouse_speed" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<description>
|
||||
Returns the mouse speed.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_mouse_button_mask" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time the bits are added together.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_mouse_mode">
|
||||
<argument index="0" name="mode" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Set the mouse mode. See the constants for more information.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_mouse_mode" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
Return the mouse mode. See the constants for more information.
|
||||
</description>
|
||||
</method>
|
||||
<method name="warp_mouse_pos">
|
||||
<argument index="0" name="to" type="Vector2">
|
||||
</argument>
|
||||
<description>
|
||||
Sets the mouse position to the specified vector.
|
||||
</description>
|
||||
</method>
|
||||
<method name="action_press">
|
||||
<argument index="0" name="action" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
This will simulate pressing the specificed action.
|
||||
</description>
|
||||
</method>
|
||||
<method name="action_release">
|
||||
<argument index="0" name="action" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
If the specified action is already pressed, this will release it.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_custom_mouse_cursor">
|
||||
|
@ -15179,6 +15191,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||
<argument index="1" name="hotspot" type="Vector2" default="Vector2(0,0)">
|
||||
</argument>
|
||||
<description>
|
||||
Set a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -15195,10 +15208,13 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||
</signals>
|
||||
<constants>
|
||||
<constant name="MOUSE_MODE_VISIBLE" value="0">
|
||||
Makes the mouse cursor visible if it is hidden.
|
||||
</constant>
|
||||
<constant name="MOUSE_MODE_HIDDEN" value="1">
|
||||
Makes the mouse cursor hidden if it is visible.
|
||||
</constant>
|
||||
<constant name="MOUSE_MODE_CAPTURED" value="2">
|
||||
Captures the mouse. The mouse will be hidden and unable to leave the game window. But it will still register movement and mouse button presses.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
|
Loading…
Reference in New Issue