diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2021-08-13 16:31:57 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2021-11-12 15:37:54 -0600 |
commit | 3c0fdcc8acfadb124fbfa914532868948561c351 (patch) | |
tree | e6d222c6488c1e4f1a9e4ffa68c1404473a00843 /doc | |
parent | 4f85cad013c5469a39287e9aa474735f950e302c (diff) |
Use "enum class" for input enums
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/@GlobalScope.xml | 14 | ||||
-rw-r--r-- | doc/classes/BaseButton.xml | 2 | ||||
-rw-r--r-- | doc/classes/Input.xml | 2 | ||||
-rw-r--r-- | doc/classes/InputEventKey.xml | 4 | ||||
-rw-r--r-- | doc/classes/InputEventMouse.xml | 2 | ||||
-rw-r--r-- | doc/classes/OS.xml | 4 | ||||
-rw-r--r-- | doc/classes/PopupMenu.xml | 18 |
7 files changed, 23 insertions, 23 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 345a769ca5..21b5147386 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1251,7 +1251,7 @@ <constant name="INLINE_ALIGN_BOTTOM" value="14" enum="InlineAlign"> Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equvalent to [code]INLINE_ALIGN_BOTTOM_TO | INLINE_ALIGN_TO_BOTTOM[/code]. </constant> - <constant name="SPKEY" value="16777216"> + <constant name="KEY_SPECIAL" value="16777216" enum="Key"> Keycodes with this bit applied are non-printable. </constant> <constant name="KEY_ESCAPE" value="16777217" enum="Key"> @@ -2016,12 +2016,6 @@ <constant name="MOUSE_BUTTON_MIDDLE" value="3" enum="MouseButton"> Middle mouse button. </constant> - <constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="MouseButton"> - Extra mouse button 1 (only present on some mice). - </constant> - <constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton"> - Extra mouse button 2 (only present on some mice). - </constant> <constant name="MOUSE_BUTTON_WHEEL_UP" value="4" enum="MouseButton"> Mouse wheel up. </constant> @@ -2034,6 +2028,12 @@ <constant name="MOUSE_BUTTON_WHEEL_RIGHT" value="7" enum="MouseButton"> Mouse wheel right button (only present on some mice). </constant> + <constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="MouseButton"> + Extra mouse button 1 (only present on some mice). + </constant> + <constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton"> + Extra mouse button 2 (only present on some mice). + </constant> <constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButton"> Left mouse button mask. </constant> diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 889c703b07..981b3167d9 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -50,7 +50,7 @@ <member name="button_group" type="ButtonGroup" setter="set_button_group" getter="get_button_group"> The [ButtonGroup] associated with the button. Not to be confused with node groups. </member> - <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1"> + <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="1"> Binary mask to choose which mouse buttons this button will respond to. To allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT[/code]. </member> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 1fded42db2..684207e9bd 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -155,7 +155,7 @@ </description> </method> <method name="get_mouse_button_mask" qualifiers="const"> - <return type="int" /> + <return type="int" enum="MouseButton" /> <description> Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. </description> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index 9cf6872655..0353c5f0e0 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -11,14 +11,14 @@ </tutorials> <methods> <method name="get_keycode_with_modifiers" qualifiers="const"> - <return type="int" /> + <return type="int" enum="Key" /> <description> Returns the keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey]. </description> </method> <method name="get_physical_keycode_with_modifiers" qualifiers="const"> - <return type="int" /> + <return type="int" enum="Key" /> <description> Returns the physical keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_physical_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey]. diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index b06068aff3..a248f1abd9 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -10,7 +10,7 @@ <link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> </tutorials> <members> - <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="0"> + <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="0"> The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks. </member> <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2(0, 0)"> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index f4d48f5db2..dcd41e46f0 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -133,7 +133,7 @@ </description> </method> <method name="find_keycode_from_string" qualifiers="const"> - <return type="int" /> + <return type="int" enum="Key" /> <argument index="0" name="string" type="String" /> <description> Returns the keycode of the given string (e.g. "Escape"). @@ -222,7 +222,7 @@ </method> <method name="get_keycode_string" qualifiers="const"> <return type="String" /> - <argument index="0" name="code" type="int" /> + <argument index="0" name="code" type="int" enum="Key" /> <description> Returns the given keycode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]). See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers]. diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 044325afbe..4eb3ef34b4 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -15,7 +15,7 @@ <return type="void" /> <argument index="0" name="label" type="String" /> <argument index="1" name="id" type="int" default="-1" /> - <argument index="2" name="accel" type="int" default="0" /> + <argument index="2" name="accel" type="int" enum="Key" default="0" /> <description> Adds a new checkable item with text [code]label[/code]. An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. @@ -38,7 +38,7 @@ <argument index="0" name="texture" type="Texture2D" /> <argument index="1" name="label" type="String" /> <argument index="2" name="id" type="int" default="-1" /> - <argument index="3" name="accel" type="int" default="0" /> + <argument index="3" name="accel" type="int" enum="Key" default="0" /> <description> Adds a new checkable item with text [code]label[/code] and icon [code]texture[/code]. An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. @@ -62,7 +62,7 @@ <argument index="0" name="texture" type="Texture2D" /> <argument index="1" name="label" type="String" /> <argument index="2" name="id" type="int" default="-1" /> - <argument index="3" name="accel" type="int" default="0" /> + <argument index="3" name="accel" type="int" enum="Key" default="0" /> <description> Adds a new item with text [code]label[/code] and icon [code]texture[/code]. An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. @@ -73,7 +73,7 @@ <argument index="0" name="texture" type="Texture2D" /> <argument index="1" name="label" type="String" /> <argument index="2" name="id" type="int" default="-1" /> - <argument index="3" name="accel" type="int" default="0" /> + <argument index="3" name="accel" type="int" enum="Key" default="0" /> <description> Same as [method add_icon_check_item], but uses a radio check button. </description> @@ -103,7 +103,7 @@ <return type="void" /> <argument index="0" name="label" type="String" /> <argument index="1" name="id" type="int" default="-1" /> - <argument index="2" name="accel" type="int" default="0" /> + <argument index="2" name="accel" type="int" enum="Key" default="0" /> <description> Adds a new item with text [code]label[/code]. An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. @@ -115,7 +115,7 @@ <argument index="1" name="max_states" type="int" /> <argument index="2" name="default_state" type="int" default="0" /> <argument index="3" name="id" type="int" default="-1" /> - <argument index="4" name="accel" type="int" default="0" /> + <argument index="4" name="accel" type="int" enum="Key" default="0" /> <description> Adds a new multistate item with text [code]label[/code]. Contrarily to normal binary items, multistate items can have more than two states, as defined by [code]max_states[/code]. Each press or activate of the item will increase the state by one. The default value is defined by [code]default_state[/code]. @@ -126,7 +126,7 @@ <return type="void" /> <argument index="0" name="label" type="String" /> <argument index="1" name="id" type="int" default="-1" /> - <argument index="2" name="accel" type="int" default="0" /> + <argument index="2" name="accel" type="int" enum="Key" default="0" /> <description> Adds a new radio check button with text [code]label[/code]. An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. @@ -193,7 +193,7 @@ </description> </method> <method name="get_item_accelerator" qualifiers="const"> - <return type="int" /> + <return type="int" enum="Key" /> <argument index="0" name="idx" type="int" /> <description> Returns the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. @@ -333,7 +333,7 @@ <method name="set_item_accelerator"> <return type="void" /> <argument index="0" name="idx" type="int" /> - <argument index="1" name="accel" type="int" /> + <argument index="1" name="accel" type="int" enum="Key" /> <description> Sets the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. </description> |