diff options
author | CowThing <cowthing@gmail.com> | 2016-05-03 14:42:41 -0400 |
---|---|---|
committer | CowThing <cowthing@gmail.com> | 2016-05-03 14:44:58 -0400 |
commit | f6ae5e41de720996195eb02e1ba6ea954e4932e9 (patch) | |
tree | 137b8d7302e04bf94d1760ce57a21eea41930862 /doc/base/classes.xml | |
parent | 5b039245b9d95c8ca1914d41d976e9a52e5510ef (diff) |
Input Documentation
Input Documentation
Diffstat (limited to 'doc/base/classes.xml')
-rw-r--r-- | doc/base/classes.xml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 4c691bc61e..cba5425d3f 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -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> |