diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2020-05-13 18:27:34 -0400 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2021-03-23 07:13:23 -0400 |
commit | a5324787c80ebc55b123ab19db2b23404b1241ec (patch) | |
tree | a2e06d3fe9c9d0388d3d6803ff6a343a80fa9f80 | |
parent | 10d7fccb549a743a867b92f12a6d64717c45ba86 (diff) |
Rename some more global enums (Key, Joy, MIDI)
27 files changed, 366 insertions, 366 deletions
diff --git a/core/core_constants.cpp b/core/core_constants.cpp index 4f2faf4172..f40928350a 100644 --- a/core/core_constants.cpp +++ b/core/core_constants.cpp @@ -104,12 +104,12 @@ static Vector<_CoreConstant> _global_constants; #endif -VARIANT_ENUM_CAST(KeyList); +VARIANT_ENUM_CAST(Key); VARIANT_ENUM_CAST(KeyModifierMask); VARIANT_ENUM_CAST(MouseButton); -VARIANT_ENUM_CAST(JoyButtonList); -VARIANT_ENUM_CAST(JoyAxisList); -VARIANT_ENUM_CAST(MidiMessageList); +VARIANT_ENUM_CAST(JoyButton); +VARIANT_ENUM_CAST(JoyAxis); +VARIANT_ENUM_CAST(MIDIMessage); void register_global_constants() { BIND_CORE_ENUM_CONSTANT(SIDE_LEFT); diff --git a/core/input/input.cpp b/core/input/input.cpp index 09a5c5ef32..627944210f 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -907,7 +907,7 @@ void Input::joy_button(int p_device, int p_button, bool p_pressed) { // no event? } -void Input::joy_axis(int p_device, int p_axis, const JoyAxis &p_value) { +void Input::joy_axis(int p_device, int p_axis, const JoyAxisValue &p_value) { _THREAD_SAFE_METHOD_; ERR_FAIL_INDEX(p_axis, JOY_AXIS_MAX); @@ -921,12 +921,12 @@ void Input::joy_axis(int p_device, int p_axis, const JoyAxis &p_value) { //when changing direction quickly, insert fake event to release pending inputmap actions float last = joy.last_axis[p_axis]; if (p_value.min == 0 && (last < 0.25 || last > 0.75) && (last - 0.5) * (p_value.value - 0.5) < 0) { - JoyAxis jx; + JoyAxisValue jx; jx.min = p_value.min; jx.value = p_value.value < 0.5 ? 0.6 : 0.4; joy_axis(p_device, p_axis, jx); } else if (ABS(last) > 0.5 && last * p_value.value <= 0) { - JoyAxis jx; + JoyAxisValue jx; jx.min = p_value.min; jx.value = last > 0 ? 0.1 : -0.1; joy_axis(p_device, p_axis, jx); @@ -1206,22 +1206,22 @@ void Input::_get_mapped_hat_events(const JoyDeviceMapping &mapping, int p_hat, J } } -JoyButtonList Input::_get_output_button(String output) { +JoyButton Input::_get_output_button(String output) { for (int i = 0; i < JOY_BUTTON_SDL_MAX; i++) { if (output == _joy_buttons[i]) { - return JoyButtonList(i); + return JoyButton(i); } } - return JoyButtonList::JOY_BUTTON_INVALID; + return JoyButton::JOY_BUTTON_INVALID; } -JoyAxisList Input::_get_output_axis(String output) { +JoyAxis Input::_get_output_axis(String output) { for (int i = 0; i < JOY_AXIS_SDL_MAX; i++) { if (output == _joy_axes[i]) { - return JoyAxisList(i); + return JoyAxis(i); } } - return JoyAxisList::JOY_AXIS_INVALID; + return JoyAxis::JOY_AXIS_INVALID; } void Input::parse_mapping(String p_mapping) { @@ -1279,8 +1279,8 @@ void Input::parse_mapping(String p_mapping) { input = input.left(input.length() - 1); } - JoyButtonList output_button = _get_output_button(output); - JoyAxisList output_axis = _get_output_axis(output); + JoyButton output_button = _get_output_button(output); + JoyAxis output_axis = _get_output_axis(output); ERR_CONTINUE_MSG(output_button == JOY_BUTTON_INVALID && output_axis == JOY_AXIS_INVALID, String(entry[idx] + "\nUnrecognised output string: " + output)); ERR_CONTINUE_MSG(output_button != JOY_BUTTON_INVALID && output_axis != JOY_AXIS_INVALID, diff --git a/core/input/input.h b/core/input/input.h index 0e3af42381..99b45db325 100644 --- a/core/input/input.h +++ b/core/input/input.h @@ -91,7 +91,7 @@ public: JOYPADS_MAX = 16, }; - struct JoyAxis { + struct JoyAxisValue { int min; float value; }; @@ -199,10 +199,10 @@ private: JoyType outputType; union { - JoyButtonList button; + JoyButton button; struct { - JoyAxisList axis; + JoyAxis axis; JoyAxisRange range; } axis; @@ -220,8 +220,8 @@ private: JoyEvent _get_mapped_button_event(const JoyDeviceMapping &mapping, int p_button); JoyEvent _get_mapped_axis_event(const JoyDeviceMapping &mapping, int p_axis, float p_value); void _get_mapped_hat_events(const JoyDeviceMapping &mapping, int p_hat, JoyEvent r_events[HAT_MAX]); - JoyButtonList _get_output_button(String output); - JoyAxisList _get_output_axis(String output); + JoyButton _get_output_button(String output); + JoyAxis _get_output_axis(String output); void _button_event(int p_device, int p_index, bool p_pressed); void _axis_event(int p_device, int p_axis, float p_value); @@ -325,7 +325,7 @@ public: void parse_mapping(String p_mapping); void joy_button(int p_device, int p_button, bool p_pressed); - void joy_axis(int p_device, int p_axis, const JoyAxis &p_value); + void joy_axis(int p_device, int p_axis, const JoyAxisValue &p_value); void joy_hat(int p_device, int p_val); void add_joy_mapping(String p_mapping, bool p_update_existing = false); diff --git a/core/input/input_event.h b/core/input/input_event.h index 42bfdd340e..a1e7df5969 100644 --- a/core/input/input_event.h +++ b/core/input/input_event.h @@ -59,7 +59,7 @@ enum MouseButton { MOUSE_BUTTON_MASK_XBUTTON2 = (1 << (MOUSE_BUTTON_XBUTTON2 - 1)) }; -enum JoyButtonList { +enum JoyButton { JOY_BUTTON_INVALID = -1, JOY_BUTTON_A = 0, JOY_BUTTON_B = 1, @@ -86,7 +86,7 @@ enum JoyButtonList { JOY_BUTTON_MAX = 36, // Android supports up to 36 buttons. }; -enum JoyAxisList { +enum JoyAxis { JOY_AXIS_INVALID = -1, JOY_AXIS_LEFT_X = 0, JOY_AXIS_LEFT_Y = 1, @@ -98,7 +98,7 @@ enum JoyAxisList { JOY_AXIS_MAX = 10, // OpenVR supports up to 5 Joysticks making a total of 10 axes. }; -enum MidiMessageList { +enum MIDIMessage { MIDI_MESSAGE_NOTE_OFF = 0x8, MIDI_MESSAGE_NOTE_ON = 0x9, MIDI_MESSAGE_AFTERTOUCH = 0xA, diff --git a/core/os/keyboard.h b/core/os/keyboard.h index 3ef70e786f..f6fe5fc070 100644 --- a/core/os/keyboard.h +++ b/core/os/keyboard.h @@ -45,7 +45,7 @@ enum { SPKEY = (1 << 24) }; -enum KeyList { +enum Key { /* CURSOR/FUNCTION/BROWSER/MULTIMEDIA/MISC KEYS */ KEY_ESCAPE = SPKEY | 0x01, KEY_TAB = SPKEY | 0x02, diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index cc6cd8a662..25f8f22d44 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1308,730 +1308,730 @@ <constant name="SPKEY" value="16777216"> Keycodes with this bit applied are non-printable. </constant> - <constant name="KEY_ESCAPE" value="16777217" enum="KeyList"> + <constant name="KEY_ESCAPE" value="16777217" enum="Key"> Escape key. </constant> - <constant name="KEY_TAB" value="16777218" enum="KeyList"> + <constant name="KEY_TAB" value="16777218" enum="Key"> Tab key. </constant> - <constant name="KEY_BACKTAB" value="16777219" enum="KeyList"> + <constant name="KEY_BACKTAB" value="16777219" enum="Key"> Shift + Tab key. </constant> - <constant name="KEY_BACKSPACE" value="16777220" enum="KeyList"> + <constant name="KEY_BACKSPACE" value="16777220" enum="Key"> Backspace key. </constant> - <constant name="KEY_ENTER" value="16777221" enum="KeyList"> + <constant name="KEY_ENTER" value="16777221" enum="Key"> Return key (on the main keyboard). </constant> - <constant name="KEY_KP_ENTER" value="16777222" enum="KeyList"> + <constant name="KEY_KP_ENTER" value="16777222" enum="Key"> Enter key on the numeric keypad. </constant> - <constant name="KEY_INSERT" value="16777223" enum="KeyList"> + <constant name="KEY_INSERT" value="16777223" enum="Key"> Insert key. </constant> - <constant name="KEY_DELETE" value="16777224" enum="KeyList"> + <constant name="KEY_DELETE" value="16777224" enum="Key"> Delete key. </constant> - <constant name="KEY_PAUSE" value="16777225" enum="KeyList"> + <constant name="KEY_PAUSE" value="16777225" enum="Key"> Pause key. </constant> - <constant name="KEY_PRINT" value="16777226" enum="KeyList"> + <constant name="KEY_PRINT" value="16777226" enum="Key"> Print Screen key. </constant> - <constant name="KEY_SYSREQ" value="16777227" enum="KeyList"> + <constant name="KEY_SYSREQ" value="16777227" enum="Key"> System Request key. </constant> - <constant name="KEY_CLEAR" value="16777228" enum="KeyList"> + <constant name="KEY_CLEAR" value="16777228" enum="Key"> Clear key. </constant> - <constant name="KEY_HOME" value="16777229" enum="KeyList"> + <constant name="KEY_HOME" value="16777229" enum="Key"> Home key. </constant> - <constant name="KEY_END" value="16777230" enum="KeyList"> + <constant name="KEY_END" value="16777230" enum="Key"> End key. </constant> - <constant name="KEY_LEFT" value="16777231" enum="KeyList"> + <constant name="KEY_LEFT" value="16777231" enum="Key"> Left arrow key. </constant> - <constant name="KEY_UP" value="16777232" enum="KeyList"> + <constant name="KEY_UP" value="16777232" enum="Key"> Up arrow key. </constant> - <constant name="KEY_RIGHT" value="16777233" enum="KeyList"> + <constant name="KEY_RIGHT" value="16777233" enum="Key"> Right arrow key. </constant> - <constant name="KEY_DOWN" value="16777234" enum="KeyList"> + <constant name="KEY_DOWN" value="16777234" enum="Key"> Down arrow key. </constant> - <constant name="KEY_PAGEUP" value="16777235" enum="KeyList"> + <constant name="KEY_PAGEUP" value="16777235" enum="Key"> Page Up key. </constant> - <constant name="KEY_PAGEDOWN" value="16777236" enum="KeyList"> + <constant name="KEY_PAGEDOWN" value="16777236" enum="Key"> Page Down key. </constant> - <constant name="KEY_SHIFT" value="16777237" enum="KeyList"> + <constant name="KEY_SHIFT" value="16777237" enum="Key"> Shift key. </constant> - <constant name="KEY_CONTROL" value="16777238" enum="KeyList"> + <constant name="KEY_CONTROL" value="16777238" enum="Key"> Control key. </constant> - <constant name="KEY_META" value="16777239" enum="KeyList"> + <constant name="KEY_META" value="16777239" enum="Key"> Meta key. </constant> - <constant name="KEY_ALT" value="16777240" enum="KeyList"> + <constant name="KEY_ALT" value="16777240" enum="Key"> Alt key. </constant> - <constant name="KEY_CAPSLOCK" value="16777241" enum="KeyList"> + <constant name="KEY_CAPSLOCK" value="16777241" enum="Key"> Caps Lock key. </constant> - <constant name="KEY_NUMLOCK" value="16777242" enum="KeyList"> + <constant name="KEY_NUMLOCK" value="16777242" enum="Key"> Num Lock key. </constant> - <constant name="KEY_SCROLLLOCK" value="16777243" enum="KeyList"> + <constant name="KEY_SCROLLLOCK" value="16777243" enum="Key"> Scroll Lock key. </constant> - <constant name="KEY_F1" value="16777244" enum="KeyList"> + <constant name="KEY_F1" value="16777244" enum="Key"> F1 key. </constant> - <constant name="KEY_F2" value="16777245" enum="KeyList"> + <constant name="KEY_F2" value="16777245" enum="Key"> F2 key. </constant> - <constant name="KEY_F3" value="16777246" enum="KeyList"> + <constant name="KEY_F3" value="16777246" enum="Key"> F3 key. </constant> - <constant name="KEY_F4" value="16777247" enum="KeyList"> + <constant name="KEY_F4" value="16777247" enum="Key"> F4 key. </constant> - <constant name="KEY_F5" value="16777248" enum="KeyList"> + <constant name="KEY_F5" value="16777248" enum="Key"> F5 key. </constant> - <constant name="KEY_F6" value="16777249" enum="KeyList"> + <constant name="KEY_F6" value="16777249" enum="Key"> F6 key. </constant> - <constant name="KEY_F7" value="16777250" enum="KeyList"> + <constant name="KEY_F7" value="16777250" enum="Key"> F7 key. </constant> - <constant name="KEY_F8" value="16777251" enum="KeyList"> + <constant name="KEY_F8" value="16777251" enum="Key"> F8 key. </constant> - <constant name="KEY_F9" value="16777252" enum="KeyList"> + <constant name="KEY_F9" value="16777252" enum="Key"> F9 key. </constant> - <constant name="KEY_F10" value="16777253" enum="KeyList"> + <constant name="KEY_F10" value="16777253" enum="Key"> F10 key. </constant> - <constant name="KEY_F11" value="16777254" enum="KeyList"> + <constant name="KEY_F11" value="16777254" enum="Key"> F11 key. </constant> - <constant name="KEY_F12" value="16777255" enum="KeyList"> + <constant name="KEY_F12" value="16777255" enum="Key"> F12 key. </constant> - <constant name="KEY_F13" value="16777256" enum="KeyList"> + <constant name="KEY_F13" value="16777256" enum="Key"> F13 key. </constant> - <constant name="KEY_F14" value="16777257" enum="KeyList"> + <constant name="KEY_F14" value="16777257" enum="Key"> F14 key. </constant> - <constant name="KEY_F15" value="16777258" enum="KeyList"> + <constant name="KEY_F15" value="16777258" enum="Key"> F15 key. </constant> - <constant name="KEY_F16" value="16777259" enum="KeyList"> + <constant name="KEY_F16" value="16777259" enum="Key"> F16 key. </constant> - <constant name="KEY_KP_MULTIPLY" value="16777345" enum="KeyList"> + <constant name="KEY_KP_MULTIPLY" value="16777345" enum="Key"> Multiply (*) key on the numeric keypad. </constant> - <constant name="KEY_KP_DIVIDE" value="16777346" enum="KeyList"> + <constant name="KEY_KP_DIVIDE" value="16777346" enum="Key"> Divide (/) key on the numeric keypad. </constant> - <constant name="KEY_KP_SUBTRACT" value="16777347" enum="KeyList"> + <constant name="KEY_KP_SUBTRACT" value="16777347" enum="Key"> Subtract (-) key on the numeric keypad. </constant> - <constant name="KEY_KP_PERIOD" value="16777348" enum="KeyList"> + <constant name="KEY_KP_PERIOD" value="16777348" enum="Key"> Period (.) key on the numeric keypad. </constant> - <constant name="KEY_KP_ADD" value="16777349" enum="KeyList"> + <constant name="KEY_KP_ADD" value="16777349" enum="Key"> Add (+) key on the numeric keypad. </constant> - <constant name="KEY_KP_0" value="16777350" enum="KeyList"> + <constant name="KEY_KP_0" value="16777350" enum="Key"> Number 0 on the numeric keypad. </constant> - <constant name="KEY_KP_1" value="16777351" enum="KeyList"> + <constant name="KEY_KP_1" value="16777351" enum="Key"> Number 1 on the numeric keypad. </constant> - <constant name="KEY_KP_2" value="16777352" enum="KeyList"> + <constant name="KEY_KP_2" value="16777352" enum="Key"> Number 2 on the numeric keypad. </constant> - <constant name="KEY_KP_3" value="16777353" enum="KeyList"> + <constant name="KEY_KP_3" value="16777353" enum="Key"> Number 3 on the numeric keypad. </constant> - <constant name="KEY_KP_4" value="16777354" enum="KeyList"> + <constant name="KEY_KP_4" value="16777354" enum="Key"> Number 4 on the numeric keypad. </constant> - <constant name="KEY_KP_5" value="16777355" enum="KeyList"> + <constant name="KEY_KP_5" value="16777355" enum="Key"> Number 5 on the numeric keypad. </constant> - <constant name="KEY_KP_6" value="16777356" enum="KeyList"> + <constant name="KEY_KP_6" value="16777356" enum="Key"> Number 6 on the numeric keypad. </constant> - <constant name="KEY_KP_7" value="16777357" enum="KeyList"> + <constant name="KEY_KP_7" value="16777357" enum="Key"> Number 7 on the numeric keypad. </constant> - <constant name="KEY_KP_8" value="16777358" enum="KeyList"> + <constant name="KEY_KP_8" value="16777358" enum="Key"> Number 8 on the numeric keypad. </constant> - <constant name="KEY_KP_9" value="16777359" enum="KeyList"> + <constant name="KEY_KP_9" value="16777359" enum="Key"> Number 9 on the numeric keypad. </constant> - <constant name="KEY_SUPER_L" value="16777260" enum="KeyList"> + <constant name="KEY_SUPER_L" value="16777260" enum="Key"> Left Super key (Windows key). </constant> - <constant name="KEY_SUPER_R" value="16777261" enum="KeyList"> + <constant name="KEY_SUPER_R" value="16777261" enum="Key"> Right Super key (Windows key). </constant> - <constant name="KEY_MENU" value="16777262" enum="KeyList"> + <constant name="KEY_MENU" value="16777262" enum="Key"> Context menu key. </constant> - <constant name="KEY_HYPER_L" value="16777263" enum="KeyList"> + <constant name="KEY_HYPER_L" value="16777263" enum="Key"> Left Hyper key. </constant> - <constant name="KEY_HYPER_R" value="16777264" enum="KeyList"> + <constant name="KEY_HYPER_R" value="16777264" enum="Key"> Right Hyper key. </constant> - <constant name="KEY_HELP" value="16777265" enum="KeyList"> + <constant name="KEY_HELP" value="16777265" enum="Key"> Help key. </constant> - <constant name="KEY_DIRECTION_L" value="16777266" enum="KeyList"> + <constant name="KEY_DIRECTION_L" value="16777266" enum="Key"> Left Direction key. </constant> - <constant name="KEY_DIRECTION_R" value="16777267" enum="KeyList"> + <constant name="KEY_DIRECTION_R" value="16777267" enum="Key"> Right Direction key. </constant> - <constant name="KEY_BACK" value="16777280" enum="KeyList"> + <constant name="KEY_BACK" value="16777280" enum="Key"> Media back key. Not to be confused with the Back button on an Android device. </constant> - <constant name="KEY_FORWARD" value="16777281" enum="KeyList"> + <constant name="KEY_FORWARD" value="16777281" enum="Key"> Media forward key. </constant> - <constant name="KEY_STOP" value="16777282" enum="KeyList"> + <constant name="KEY_STOP" value="16777282" enum="Key"> Media stop key. </constant> - <constant name="KEY_REFRESH" value="16777283" enum="KeyList"> + <constant name="KEY_REFRESH" value="16777283" enum="Key"> Media refresh key. </constant> - <constant name="KEY_VOLUMEDOWN" value="16777284" enum="KeyList"> + <constant name="KEY_VOLUMEDOWN" value="16777284" enum="Key"> Volume down key. </constant> - <constant name="KEY_VOLUMEMUTE" value="16777285" enum="KeyList"> + <constant name="KEY_VOLUMEMUTE" value="16777285" enum="Key"> Mute volume key. </constant> - <constant name="KEY_VOLUMEUP" value="16777286" enum="KeyList"> + <constant name="KEY_VOLUMEUP" value="16777286" enum="Key"> Volume up key. </constant> - <constant name="KEY_BASSBOOST" value="16777287" enum="KeyList"> + <constant name="KEY_BASSBOOST" value="16777287" enum="Key"> Bass Boost key. </constant> - <constant name="KEY_BASSUP" value="16777288" enum="KeyList"> + <constant name="KEY_BASSUP" value="16777288" enum="Key"> Bass up key. </constant> - <constant name="KEY_BASSDOWN" value="16777289" enum="KeyList"> + <constant name="KEY_BASSDOWN" value="16777289" enum="Key"> Bass down key. </constant> - <constant name="KEY_TREBLEUP" value="16777290" enum="KeyList"> + <constant name="KEY_TREBLEUP" value="16777290" enum="Key"> Treble up key. </constant> - <constant name="KEY_TREBLEDOWN" value="16777291" enum="KeyList"> + <constant name="KEY_TREBLEDOWN" value="16777291" enum="Key"> Treble down key. </constant> - <constant name="KEY_MEDIAPLAY" value="16777292" enum="KeyList"> + <constant name="KEY_MEDIAPLAY" value="16777292" enum="Key"> Media play key. </constant> - <constant name="KEY_MEDIASTOP" value="16777293" enum="KeyList"> + <constant name="KEY_MEDIASTOP" value="16777293" enum="Key"> Media stop key. </constant> - <constant name="KEY_MEDIAPREVIOUS" value="16777294" enum="KeyList"> + <constant name="KEY_MEDIAPREVIOUS" value="16777294" enum="Key"> Previous song key. </constant> - <constant name="KEY_MEDIANEXT" value="16777295" enum="KeyList"> + <constant name="KEY_MEDIANEXT" value="16777295" enum="Key"> Next song key. </constant> - <constant name="KEY_MEDIARECORD" value="16777296" enum="KeyList"> + <constant name="KEY_MEDIARECORD" value="16777296" enum="Key"> Media record key. </constant> - <constant name="KEY_HOMEPAGE" value="16777297" enum="KeyList"> + <constant name="KEY_HOMEPAGE" value="16777297" enum="Key"> Home page key. </constant> - <constant name="KEY_FAVORITES" value="16777298" enum="KeyList"> + <constant name="KEY_FAVORITES" value="16777298" enum="Key"> Favorites key. </constant> - <constant name="KEY_SEARCH" value="16777299" enum="KeyList"> + <constant name="KEY_SEARCH" value="16777299" enum="Key"> Search key. </constant> - <constant name="KEY_STANDBY" value="16777300" enum="KeyList"> + <constant name="KEY_STANDBY" value="16777300" enum="Key"> Standby key. </constant> - <constant name="KEY_OPENURL" value="16777301" enum="KeyList"> + <constant name="KEY_OPENURL" value="16777301" enum="Key"> Open URL / Launch Browser key. </constant> - <constant name="KEY_LAUNCHMAIL" value="16777302" enum="KeyList"> + <constant name="KEY_LAUNCHMAIL" value="16777302" enum="Key"> Launch Mail key. </constant> - <constant name="KEY_LAUNCHMEDIA" value="16777303" enum="KeyList"> + <constant name="KEY_LAUNCHMEDIA" value="16777303" enum="Key"> Launch Media key. </constant> - <constant name="KEY_LAUNCH0" value="16777304" enum="KeyList"> + <constant name="KEY_LAUNCH0" value="16777304" enum="Key"> Launch Shortcut 0 key. </constant> - <constant name="KEY_LAUNCH1" value="16777305" enum="KeyList"> + <constant name="KEY_LAUNCH1" value="16777305" enum="Key"> Launch Shortcut 1 key. </constant> - <constant name="KEY_LAUNCH2" value="16777306" enum="KeyList"> + <constant name="KEY_LAUNCH2" value="16777306" enum="Key"> Launch Shortcut 2 key. </constant> - <constant name="KEY_LAUNCH3" value="16777307" enum="KeyList"> + <constant name="KEY_LAUNCH3" value="16777307" enum="Key"> Launch Shortcut 3 key. </constant> - <constant name="KEY_LAUNCH4" value="16777308" enum="KeyList"> + <constant name="KEY_LAUNCH4" value="16777308" enum="Key"> Launch Shortcut 4 key. </constant> - <constant name="KEY_LAUNCH5" value="16777309" enum="KeyList"> + <constant name="KEY_LAUNCH5" value="16777309" enum="Key"> Launch Shortcut 5 key. </constant> - <constant name="KEY_LAUNCH6" value="16777310" enum="KeyList"> + <constant name="KEY_LAUNCH6" value="16777310" enum="Key"> Launch Shortcut 6 key. </constant> - <constant name="KEY_LAUNCH7" value="16777311" enum="KeyList"> + <constant name="KEY_LAUNCH7" value="16777311" enum="Key"> Launch Shortcut 7 key. </constant> - <constant name="KEY_LAUNCH8" value="16777312" enum="KeyList"> + <constant name="KEY_LAUNCH8" value="16777312" enum="Key"> Launch Shortcut 8 key. </constant> - <constant name="KEY_LAUNCH9" value="16777313" enum="KeyList"> + <constant name="KEY_LAUNCH9" value="16777313" enum="Key"> Launch Shortcut 9 key. </constant> - <constant name="KEY_LAUNCHA" value="16777314" enum="KeyList"> + <constant name="KEY_LAUNCHA" value="16777314" enum="Key"> Launch Shortcut A key. </constant> - <constant name="KEY_LAUNCHB" value="16777315" enum="KeyList"> + <constant name="KEY_LAUNCHB" value="16777315" enum="Key"> Launch Shortcut B key. </constant> - <constant name="KEY_LAUNCHC" value="16777316" enum="KeyList"> + <constant name="KEY_LAUNCHC" value="16777316" enum="Key"> Launch Shortcut C key. </constant> - <constant name="KEY_LAUNCHD" value="16777317" enum="KeyList"> + <constant name="KEY_LAUNCHD" value="16777317" enum="Key"> Launch Shortcut D key. </constant> - <constant name="KEY_LAUNCHE" value="16777318" enum="KeyList"> + <constant name="KEY_LAUNCHE" value="16777318" enum="Key"> Launch Shortcut E key. </constant> - <constant name="KEY_LAUNCHF" value="16777319" enum="KeyList"> + <constant name="KEY_LAUNCHF" value="16777319" enum="Key"> Launch Shortcut F key. </constant> - <constant name="KEY_UNKNOWN" value="33554431" enum="KeyList"> + <constant name="KEY_UNKNOWN" value="33554431" enum="Key"> Unknown key. </constant> - <constant name="KEY_SPACE" value="32" enum="KeyList"> + <constant name="KEY_SPACE" value="32" enum="Key"> Space key. </constant> - <constant name="KEY_EXCLAM" value="33" enum="KeyList"> + <constant name="KEY_EXCLAM" value="33" enum="Key"> ! key. </constant> - <constant name="KEY_QUOTEDBL" value="34" enum="KeyList"> + <constant name="KEY_QUOTEDBL" value="34" enum="Key"> " key. </constant> - <constant name="KEY_NUMBERSIGN" value="35" enum="KeyList"> + <constant name="KEY_NUMBERSIGN" value="35" enum="Key"> # key. </constant> - <constant name="KEY_DOLLAR" value="36" enum="KeyList"> + <constant name="KEY_DOLLAR" value="36" enum="Key"> $ key. </constant> - <constant name="KEY_PERCENT" value="37" enum="KeyList"> + <constant name="KEY_PERCENT" value="37" enum="Key"> % key. </constant> - <constant name="KEY_AMPERSAND" value="38" enum="KeyList"> + <constant name="KEY_AMPERSAND" value="38" enum="Key"> & key. </constant> - <constant name="KEY_APOSTROPHE" value="39" enum="KeyList"> + <constant name="KEY_APOSTROPHE" value="39" enum="Key"> ' key. </constant> - <constant name="KEY_PARENLEFT" value="40" enum="KeyList"> + <constant name="KEY_PARENLEFT" value="40" enum="Key"> ( key. </constant> - <constant name="KEY_PARENRIGHT" value="41" enum="KeyList"> + <constant name="KEY_PARENRIGHT" value="41" enum="Key"> ) key. </constant> - <constant name="KEY_ASTERISK" value="42" enum="KeyList"> + <constant name="KEY_ASTERISK" value="42" enum="Key"> * key. </constant> - <constant name="KEY_PLUS" value="43" enum="KeyList"> + <constant name="KEY_PLUS" value="43" enum="Key"> + key. </constant> - <constant name="KEY_COMMA" value="44" enum="KeyList"> + <constant name="KEY_COMMA" value="44" enum="Key"> , key. </constant> - <constant name="KEY_MINUS" value="45" enum="KeyList"> + <constant name="KEY_MINUS" value="45" enum="Key"> - key. </constant> - <constant name="KEY_PERIOD" value="46" enum="KeyList"> + <constant name="KEY_PERIOD" value="46" enum="Key"> . key. </constant> - <constant name="KEY_SLASH" value="47" enum="KeyList"> + <constant name="KEY_SLASH" value="47" enum="Key"> / key. </constant> - <constant name="KEY_0" value="48" enum="KeyList"> + <constant name="KEY_0" value="48" enum="Key"> Number 0. </constant> - <constant name="KEY_1" value="49" enum="KeyList"> + <constant name="KEY_1" value="49" enum="Key"> Number 1. </constant> - <constant name="KEY_2" value="50" enum="KeyList"> + <constant name="KEY_2" value="50" enum="Key"> Number 2. </constant> - <constant name="KEY_3" value="51" enum="KeyList"> + <constant name="KEY_3" value="51" enum="Key"> Number 3. </constant> - <constant name="KEY_4" value="52" enum="KeyList"> + <constant name="KEY_4" value="52" enum="Key"> Number 4. </constant> - <constant name="KEY_5" value="53" enum="KeyList"> + <constant name="KEY_5" value="53" enum="Key"> Number 5. </constant> - <constant name="KEY_6" value="54" enum="KeyList"> + <constant name="KEY_6" value="54" enum="Key"> Number 6. </constant> - <constant name="KEY_7" value="55" enum="KeyList"> + <constant name="KEY_7" value="55" enum="Key"> Number 7. </constant> - <constant name="KEY_8" value="56" enum="KeyList"> + <constant name="KEY_8" value="56" enum="Key"> Number 8. </constant> - <constant name="KEY_9" value="57" enum="KeyList"> + <constant name="KEY_9" value="57" enum="Key"> Number 9. </constant> - <constant name="KEY_COLON" value="58" enum="KeyList"> + <constant name="KEY_COLON" value="58" enum="Key"> : key. </constant> - <constant name="KEY_SEMICOLON" value="59" enum="KeyList"> + <constant name="KEY_SEMICOLON" value="59" enum="Key"> ; key. </constant> - <constant name="KEY_LESS" value="60" enum="KeyList"> + <constant name="KEY_LESS" value="60" enum="Key"> < key. </constant> - <constant name="KEY_EQUAL" value="61" enum="KeyList"> + <constant name="KEY_EQUAL" value="61" enum="Key"> = key. </constant> - <constant name="KEY_GREATER" value="62" enum="KeyList"> + <constant name="KEY_GREATER" value="62" enum="Key"> > key. </constant> - <constant name="KEY_QUESTION" value="63" enum="KeyList"> + <constant name="KEY_QUESTION" value="63" enum="Key"> ? key. </constant> - <constant name="KEY_AT" value="64" enum="KeyList"> + <constant name="KEY_AT" value="64" enum="Key"> @ key. </constant> - <constant name="KEY_A" value="65" enum="KeyList"> + <constant name="KEY_A" value="65" enum="Key"> A key. </constant> - <constant name="KEY_B" value="66" enum="KeyList"> + <constant name="KEY_B" value="66" enum="Key"> B key. </constant> - <constant name="KEY_C" value="67" enum="KeyList"> + <constant name="KEY_C" value="67" enum="Key"> C key. </constant> - <constant name="KEY_D" value="68" enum="KeyList"> + <constant name="KEY_D" value="68" enum="Key"> D key. </constant> - <constant name="KEY_E" value="69" enum="KeyList"> + <constant name="KEY_E" value="69" enum="Key"> E key. </constant> - <constant name="KEY_F" value="70" enum="KeyList"> + <constant name="KEY_F" value="70" enum="Key"> F key. </constant> - <constant name="KEY_G" value="71" enum="KeyList"> + <constant name="KEY_G" value="71" enum="Key"> G key. </constant> - <constant name="KEY_H" value="72" enum="KeyList"> + <constant name="KEY_H" value="72" enum="Key"> H key. </constant> - <constant name="KEY_I" value="73" enum="KeyList"> + <constant name="KEY_I" value="73" enum="Key"> I key. </constant> - <constant name="KEY_J" value="74" enum="KeyList"> + <constant name="KEY_J" value="74" enum="Key"> J key. </constant> - <constant name="KEY_K" value="75" enum="KeyList"> + <constant name="KEY_K" value="75" enum="Key"> K key. </constant> - <constant name="KEY_L" value="76" enum="KeyList"> + <constant name="KEY_L" value="76" enum="Key"> L key. </constant> - <constant name="KEY_M" value="77" enum="KeyList"> + <constant name="KEY_M" value="77" enum="Key"> M key. </constant> - <constant name="KEY_N" value="78" enum="KeyList"> + <constant name="KEY_N" value="78" enum="Key"> N key. </constant> - <constant name="KEY_O" value="79" enum="KeyList"> + <constant name="KEY_O" value="79" enum="Key"> O key. </constant> - <constant name="KEY_P" value="80" enum="KeyList"> + <constant name="KEY_P" value="80" enum="Key"> P key. </constant> - <constant name="KEY_Q" value="81" enum="KeyList"> + <constant name="KEY_Q" value="81" enum="Key"> Q key. </constant> - <constant name="KEY_R" value="82" enum="KeyList"> + <constant name="KEY_R" value="82" enum="Key"> R key. </constant> - <constant name="KEY_S" value="83" enum="KeyList"> + <constant name="KEY_S" value="83" enum="Key"> S key. </constant> - <constant name="KEY_T" value="84" enum="KeyList"> + <constant name="KEY_T" value="84" enum="Key"> T key. </constant> - <constant name="KEY_U" value="85" enum="KeyList"> + <constant name="KEY_U" value="85" enum="Key"> U key. </constant> - <constant name="KEY_V" value="86" enum="KeyList"> + <constant name="KEY_V" value="86" enum="Key"> V key. </constant> - <constant name="KEY_W" value="87" enum="KeyList"> + <constant name="KEY_W" value="87" enum="Key"> W key. </constant> - <constant name="KEY_X" value="88" enum="KeyList"> + <constant name="KEY_X" value="88" enum="Key"> X key. </constant> - <constant name="KEY_Y" value="89" enum="KeyList"> + <constant name="KEY_Y" value="89" enum="Key"> Y key. </constant> - <constant name="KEY_Z" value="90" enum="KeyList"> + <constant name="KEY_Z" value="90" enum="Key"> Z key. </constant> - <constant name="KEY_BRACKETLEFT" value="91" enum="KeyList"> + <constant name="KEY_BRACKETLEFT" value="91" enum="Key"> [ key. </constant> - <constant name="KEY_BACKSLASH" value="92" enum="KeyList"> + <constant name="KEY_BACKSLASH" value="92" enum="Key"> \ key. </constant> - <constant name="KEY_BRACKETRIGHT" value="93" enum="KeyList"> + <constant name="KEY_BRACKETRIGHT" value="93" enum="Key"> ] key. </constant> - <constant name="KEY_ASCIICIRCUM" value="94" enum="KeyList"> + <constant name="KEY_ASCIICIRCUM" value="94" enum="Key"> ^ key. </constant> - <constant name="KEY_UNDERSCORE" value="95" enum="KeyList"> + <constant name="KEY_UNDERSCORE" value="95" enum="Key"> _ key. </constant> - <constant name="KEY_QUOTELEFT" value="96" enum="KeyList"> + <constant name="KEY_QUOTELEFT" value="96" enum="Key"> ` key. </constant> - <constant name="KEY_BRACELEFT" value="123" enum="KeyList"> + <constant name="KEY_BRACELEFT" value="123" enum="Key"> { key. </constant> - <constant name="KEY_BAR" value="124" enum="KeyList"> + <constant name="KEY_BAR" value="124" enum="Key"> | key. </constant> - <constant name="KEY_BRACERIGHT" value="125" enum="KeyList"> + <constant name="KEY_BRACERIGHT" value="125" enum="Key"> } key. </constant> - <constant name="KEY_ASCIITILDE" value="126" enum="KeyList"> + <constant name="KEY_ASCIITILDE" value="126" enum="Key"> ~ key. </constant> - <constant name="KEY_NOBREAKSPACE" value="160" enum="KeyList"> + <constant name="KEY_NOBREAKSPACE" value="160" enum="Key"> Non-breakable space key. </constant> - <constant name="KEY_EXCLAMDOWN" value="161" enum="KeyList"> + <constant name="KEY_EXCLAMDOWN" value="161" enum="Key"> ¡ key. </constant> - <constant name="KEY_CENT" value="162" enum="KeyList"> + <constant name="KEY_CENT" value="162" enum="Key"> ¢ key. </constant> - <constant name="KEY_STERLING" value="163" enum="KeyList"> + <constant name="KEY_STERLING" value="163" enum="Key"> £ key. </constant> - <constant name="KEY_CURRENCY" value="164" enum="KeyList"> + <constant name="KEY_CURRENCY" value="164" enum="Key"> ¤ key. </constant> - <constant name="KEY_YEN" value="165" enum="KeyList"> + <constant name="KEY_YEN" value="165" enum="Key"> ¥ key. </constant> - <constant name="KEY_BROKENBAR" value="166" enum="KeyList"> + <constant name="KEY_BROKENBAR" value="166" enum="Key"> ¦ key. </constant> - <constant name="KEY_SECTION" value="167" enum="KeyList"> + <constant name="KEY_SECTION" value="167" enum="Key"> § key. </constant> - <constant name="KEY_DIAERESIS" value="168" enum="KeyList"> + <constant name="KEY_DIAERESIS" value="168" enum="Key"> ¨ key. </constant> - <constant name="KEY_COPYRIGHT" value="169" enum="KeyList"> + <constant name="KEY_COPYRIGHT" value="169" enum="Key"> © key. </constant> - <constant name="KEY_ORDFEMININE" value="170" enum="KeyList"> + <constant name="KEY_ORDFEMININE" value="170" enum="Key"> ª key. </constant> - <constant name="KEY_GUILLEMOTLEFT" value="171" enum="KeyList"> + <constant name="KEY_GUILLEMOTLEFT" value="171" enum="Key"> « key. </constant> - <constant name="KEY_NOTSIGN" value="172" enum="KeyList"> + <constant name="KEY_NOTSIGN" value="172" enum="Key"> ¬ key. </constant> - <constant name="KEY_HYPHEN" value="173" enum="KeyList"> + <constant name="KEY_HYPHEN" value="173" enum="Key"> Soft hyphen key. </constant> - <constant name="KEY_REGISTERED" value="174" enum="KeyList"> + <constant name="KEY_REGISTERED" value="174" enum="Key"> ® key. </constant> - <constant name="KEY_MACRON" value="175" enum="KeyList"> + <constant name="KEY_MACRON" value="175" enum="Key"> ¯ key. </constant> - <constant name="KEY_DEGREE" value="176" enum="KeyList"> + <constant name="KEY_DEGREE" value="176" enum="Key"> ° key. </constant> - <constant name="KEY_PLUSMINUS" value="177" enum="KeyList"> + <constant name="KEY_PLUSMINUS" value="177" enum="Key"> ± key. </constant> - <constant name="KEY_TWOSUPERIOR" value="178" enum="KeyList"> + <constant name="KEY_TWOSUPERIOR" value="178" enum="Key"> ² key. </constant> - <constant name="KEY_THREESUPERIOR" value="179" enum="KeyList"> + <constant name="KEY_THREESUPERIOR" value="179" enum="Key"> ³ key. </constant> - <constant name="KEY_ACUTE" value="180" enum="KeyList"> + <constant name="KEY_ACUTE" value="180" enum="Key"> ´ key. </constant> - <constant name="KEY_MU" value="181" enum="KeyList"> + <constant name="KEY_MU" value="181" enum="Key"> µ key. </constant> - <constant name="KEY_PARAGRAPH" value="182" enum="KeyList"> + <constant name="KEY_PARAGRAPH" value="182" enum="Key"> ¶ key. </constant> - <constant name="KEY_PERIODCENTERED" value="183" enum="KeyList"> + <constant name="KEY_PERIODCENTERED" value="183" enum="Key"> · key. </constant> - <constant name="KEY_CEDILLA" value="184" enum="KeyList"> + <constant name="KEY_CEDILLA" value="184" enum="Key"> ¸ key. </constant> - <constant name="KEY_ONESUPERIOR" value="185" enum="KeyList"> + <constant name="KEY_ONESUPERIOR" value="185" enum="Key"> ¹ key. </constant> - <constant name="KEY_MASCULINE" value="186" enum="KeyList"> + <constant name="KEY_MASCULINE" value="186" enum="Key"> º key. </constant> - <constant name="KEY_GUILLEMOTRIGHT" value="187" enum="KeyList"> + <constant name="KEY_GUILLEMOTRIGHT" value="187" enum="Key"> » key. </constant> - <constant name="KEY_ONEQUARTER" value="188" enum="KeyList"> + <constant name="KEY_ONEQUARTER" value="188" enum="Key"> ¼ key. </constant> - <constant name="KEY_ONEHALF" value="189" enum="KeyList"> + <constant name="KEY_ONEHALF" value="189" enum="Key"> ½ key. </constant> - <constant name="KEY_THREEQUARTERS" value="190" enum="KeyList"> + <constant name="KEY_THREEQUARTERS" value="190" enum="Key"> ¾ key. </constant> - <constant name="KEY_QUESTIONDOWN" value="191" enum="KeyList"> + <constant name="KEY_QUESTIONDOWN" value="191" enum="Key"> ¿ key. </constant> - <constant name="KEY_AGRAVE" value="192" enum="KeyList"> + <constant name="KEY_AGRAVE" value="192" enum="Key"> À key. </constant> - <constant name="KEY_AACUTE" value="193" enum="KeyList"> + <constant name="KEY_AACUTE" value="193" enum="Key"> Á key. </constant> - <constant name="KEY_ACIRCUMFLEX" value="194" enum="KeyList"> + <constant name="KEY_ACIRCUMFLEX" value="194" enum="Key"> Â key. </constant> - <constant name="KEY_ATILDE" value="195" enum="KeyList"> + <constant name="KEY_ATILDE" value="195" enum="Key"> Ã key. </constant> - <constant name="KEY_ADIAERESIS" value="196" enum="KeyList"> + <constant name="KEY_ADIAERESIS" value="196" enum="Key"> Ä key. </constant> - <constant name="KEY_ARING" value="197" enum="KeyList"> + <constant name="KEY_ARING" value="197" enum="Key"> Å key. </constant> - <constant name="KEY_AE" value="198" enum="KeyList"> + <constant name="KEY_AE" value="198" enum="Key"> Æ key. </constant> - <constant name="KEY_CCEDILLA" value="199" enum="KeyList"> + <constant name="KEY_CCEDILLA" value="199" enum="Key"> Ç key. </constant> - <constant name="KEY_EGRAVE" value="200" enum="KeyList"> + <constant name="KEY_EGRAVE" value="200" enum="Key"> È key. </constant> - <constant name="KEY_EACUTE" value="201" enum="KeyList"> + <constant name="KEY_EACUTE" value="201" enum="Key"> É key. </constant> - <constant name="KEY_ECIRCUMFLEX" value="202" enum="KeyList"> + <constant name="KEY_ECIRCUMFLEX" value="202" enum="Key"> Ê key. </constant> - <constant name="KEY_EDIAERESIS" value="203" enum="KeyList"> + <constant name="KEY_EDIAERESIS" value="203" enum="Key"> Ë key. </constant> - <constant name="KEY_IGRAVE" value="204" enum="KeyList"> + <constant name="KEY_IGRAVE" value="204" enum="Key"> Ì key. </constant> - <constant name="KEY_IACUTE" value="205" enum="KeyList"> + <constant name="KEY_IACUTE" value="205" enum="Key"> Í key. </constant> - <constant name="KEY_ICIRCUMFLEX" value="206" enum="KeyList"> + <constant name="KEY_ICIRCUMFLEX" value="206" enum="Key"> Î key. </constant> - <constant name="KEY_IDIAERESIS" value="207" enum="KeyList"> + <constant name="KEY_IDIAERESIS" value="207" enum="Key"> Ï key. </constant> - <constant name="KEY_ETH" value="208" enum="KeyList"> + <constant name="KEY_ETH" value="208" enum="Key"> Ð key. </constant> - <constant name="KEY_NTILDE" value="209" enum="KeyList"> + <constant name="KEY_NTILDE" value="209" enum="Key"> Ñ key. </constant> - <constant name="KEY_OGRAVE" value="210" enum="KeyList"> + <constant name="KEY_OGRAVE" value="210" enum="Key"> Ò key. </constant> - <constant name="KEY_OACUTE" value="211" enum="KeyList"> + <constant name="KEY_OACUTE" value="211" enum="Key"> Ó key. </constant> - <constant name="KEY_OCIRCUMFLEX" value="212" enum="KeyList"> + <constant name="KEY_OCIRCUMFLEX" value="212" enum="Key"> Ô key. </constant> - <constant name="KEY_OTILDE" value="213" enum="KeyList"> + <constant name="KEY_OTILDE" value="213" enum="Key"> Õ key. </constant> - <constant name="KEY_ODIAERESIS" value="214" enum="KeyList"> + <constant name="KEY_ODIAERESIS" value="214" enum="Key"> Ö key. </constant> - <constant name="KEY_MULTIPLY" value="215" enum="KeyList"> + <constant name="KEY_MULTIPLY" value="215" enum="Key"> × key. </constant> - <constant name="KEY_OOBLIQUE" value="216" enum="KeyList"> + <constant name="KEY_OOBLIQUE" value="216" enum="Key"> Ø key. </constant> - <constant name="KEY_UGRAVE" value="217" enum="KeyList"> + <constant name="KEY_UGRAVE" value="217" enum="Key"> Ù key. </constant> - <constant name="KEY_UACUTE" value="218" enum="KeyList"> + <constant name="KEY_UACUTE" value="218" enum="Key"> Ú key. </constant> - <constant name="KEY_UCIRCUMFLEX" value="219" enum="KeyList"> + <constant name="KEY_UCIRCUMFLEX" value="219" enum="Key"> Û key. </constant> - <constant name="KEY_UDIAERESIS" value="220" enum="KeyList"> + <constant name="KEY_UDIAERESIS" value="220" enum="Key"> Ü key. </constant> - <constant name="KEY_YACUTE" value="221" enum="KeyList"> + <constant name="KEY_YACUTE" value="221" enum="Key"> Ý key. </constant> - <constant name="KEY_THORN" value="222" enum="KeyList"> + <constant name="KEY_THORN" value="222" enum="Key"> Þ key. </constant> - <constant name="KEY_SSHARP" value="223" enum="KeyList"> + <constant name="KEY_SSHARP" value="223" enum="Key"> ß key. </constant> - <constant name="KEY_DIVISION" value="247" enum="KeyList"> + <constant name="KEY_DIVISION" value="247" enum="Key"> ÷ key. </constant> - <constant name="KEY_YDIAERESIS" value="255" enum="KeyList"> + <constant name="KEY_YDIAERESIS" value="255" enum="Key"> ÿ key. </constant> <constant name="KEY_CODE_MASK" value="33554431" enum="KeyModifierMask"> @@ -2061,166 +2061,166 @@ <constant name="KEY_MASK_GROUP_SWITCH" value="1073741824" enum="KeyModifierMask"> Group Switch key mask. </constant> - <constant name="MOUSE_BUTTON_LEFT" value="1" enum="ButtonList"> + <constant name="MOUSE_BUTTON_LEFT" value="1" enum="MouseButton"> Left mouse button. </constant> - <constant name="MOUSE_BUTTON_RIGHT" value="2" enum="ButtonList"> + <constant name="MOUSE_BUTTON_RIGHT" value="2" enum="MouseButton"> Right mouse button. </constant> - <constant name="MOUSE_BUTTON_MIDDLE" value="3" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MIDDLE" value="3" enum="MouseButton"> Middle mouse button. </constant> - <constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="ButtonList"> + <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="ButtonList"> + <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="ButtonList"> + <constant name="MOUSE_BUTTON_WHEEL_UP" value="4" enum="MouseButton"> Mouse wheel up. </constant> - <constant name="MOUSE_BUTTON_WHEEL_DOWN" value="5" enum="ButtonList"> + <constant name="MOUSE_BUTTON_WHEEL_DOWN" value="5" enum="MouseButton"> Mouse wheel down. </constant> - <constant name="MOUSE_BUTTON_WHEEL_LEFT" value="6" enum="ButtonList"> + <constant name="MOUSE_BUTTON_WHEEL_LEFT" value="6" enum="MouseButton"> Mouse wheel left button (only present on some mice). </constant> - <constant name="MOUSE_BUTTON_WHEEL_RIGHT" value="7" enum="ButtonList"> + <constant name="MOUSE_BUTTON_WHEEL_RIGHT" value="7" enum="MouseButton"> Mouse wheel right button (only present on some mice). </constant> - <constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButton"> Left mouse button mask. </constant> - <constant name="MOUSE_BUTTON_MASK_RIGHT" value="2" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MASK_RIGHT" value="2" enum="MouseButton"> Right mouse button mask. </constant> - <constant name="MOUSE_BUTTON_MASK_MIDDLE" value="4" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MASK_MIDDLE" value="4" enum="MouseButton"> Middle mouse button mask. </constant> - <constant name="MOUSE_BUTTON_MASK_XBUTTON1" value="128" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MASK_XBUTTON1" value="128" enum="MouseButton"> Extra mouse button 1 mask. </constant> - <constant name="MOUSE_BUTTON_MASK_XBUTTON2" value="256" enum="ButtonList"> + <constant name="MOUSE_BUTTON_MASK_XBUTTON2" value="256" enum="MouseButton"> Extra mouse button 2 mask. </constant> - <constant name="JOY_BUTTON_INVALID" value="-1" enum="JoyButtonList"> + <constant name="JOY_BUTTON_INVALID" value="-1" enum="JoyButton"> An invalid game controller button. </constant> - <constant name="JOY_BUTTON_A" value="0" enum="JoyButtonList"> + <constant name="JOY_BUTTON_A" value="0" enum="JoyButton"> Game controller SDL button A. Corresponds to the bottom action button: Sony Cross, Xbox A, Nintendo B. </constant> - <constant name="JOY_BUTTON_B" value="1" enum="JoyButtonList"> + <constant name="JOY_BUTTON_B" value="1" enum="JoyButton"> Game controller SDL button B. Corresponds to the right action button: Sony Circle, Xbox B, Nintendo A. </constant> - <constant name="JOY_BUTTON_X" value="2" enum="JoyButtonList"> + <constant name="JOY_BUTTON_X" value="2" enum="JoyButton"> Game controller SDL button X. Corresponds to the left action button: Sony Square, Xbox X, Nintendo Y. </constant> - <constant name="JOY_BUTTON_Y" value="3" enum="JoyButtonList"> + <constant name="JOY_BUTTON_Y" value="3" enum="JoyButton"> Game controller SDL button Y. Corresponds to the top action button: Sony Triangle, Xbox Y, Nintendo X. </constant> - <constant name="JOY_BUTTON_BACK" value="4" enum="JoyButtonList"> + <constant name="JOY_BUTTON_BACK" value="4" enum="JoyButton"> Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, Nintendo - button. </constant> - <constant name="JOY_BUTTON_GUIDE" value="5" enum="JoyButtonList"> + <constant name="JOY_BUTTON_GUIDE" value="5" enum="JoyButton"> Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button. </constant> - <constant name="JOY_BUTTON_START" value="6" enum="JoyButtonList"> + <constant name="JOY_BUTTON_START" value="6" enum="JoyButton"> Game controller SDL start button. Corresponds to the Nintendo + button. </constant> - <constant name="JOY_BUTTON_LEFT_STICK" value="7" enum="JoyButtonList"> + <constant name="JOY_BUTTON_LEFT_STICK" value="7" enum="JoyButton"> Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS button. </constant> - <constant name="JOY_BUTTON_RIGHT_STICK" value="8" enum="JoyButtonList"> + <constant name="JOY_BUTTON_RIGHT_STICK" value="8" enum="JoyButton"> Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/RS button. </constant> - <constant name="JOY_BUTTON_LEFT_SHOULDER" value="9" enum="JoyButtonList"> + <constant name="JOY_BUTTON_LEFT_SHOULDER" value="9" enum="JoyButton"> Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox LB button. </constant> - <constant name="JOY_BUTTON_RIGHT_SHOULDER" value="10" enum="JoyButtonList"> + <constant name="JOY_BUTTON_RIGHT_SHOULDER" value="10" enum="JoyButton"> Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox RB button. </constant> - <constant name="JOY_BUTTON_DPAD_UP" value="11" enum="JoyButtonList"> + <constant name="JOY_BUTTON_DPAD_UP" value="11" enum="JoyButton"> Game controller D-pad up button. </constant> - <constant name="JOY_BUTTON_DPAD_DOWN" value="12" enum="JoyButtonList"> + <constant name="JOY_BUTTON_DPAD_DOWN" value="12" enum="JoyButton"> Game controller D-pad down button. </constant> - <constant name="JOY_BUTTON_DPAD_LEFT" value="13" enum="JoyButtonList"> + <constant name="JOY_BUTTON_DPAD_LEFT" value="13" enum="JoyButton"> Game controller D-pad left button. </constant> - <constant name="JOY_BUTTON_DPAD_RIGHT" value="14" enum="JoyButtonList"> + <constant name="JOY_BUTTON_DPAD_RIGHT" value="14" enum="JoyButton"> Game controller D-pad right button. </constant> - <constant name="JOY_BUTTON_MISC1" value="15" enum="JoyButtonList"> + <constant name="JOY_BUTTON_MISC1" value="15" enum="JoyButton"> Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo capture button. </constant> - <constant name="JOY_BUTTON_PADDLE1" value="16" enum="JoyButtonList"> + <constant name="JOY_BUTTON_PADDLE1" value="16" enum="JoyButton"> Game controller SDL paddle 1 button. </constant> - <constant name="JOY_BUTTON_PADDLE2" value="17" enum="JoyButtonList"> + <constant name="JOY_BUTTON_PADDLE2" value="17" enum="JoyButton"> Game controller SDL paddle 2 button. </constant> - <constant name="JOY_BUTTON_PADDLE3" value="18" enum="JoyButtonList"> + <constant name="JOY_BUTTON_PADDLE3" value="18" enum="JoyButton"> Game controller SDL paddle 3 button. </constant> - <constant name="JOY_BUTTON_PADDLE4" value="19" enum="JoyButtonList"> + <constant name="JOY_BUTTON_PADDLE4" value="19" enum="JoyButton"> Game controller SDL paddle 4 button. </constant> - <constant name="JOY_BUTTON_TOUCHPAD" value="20" enum="JoyButtonList"> + <constant name="JOY_BUTTON_TOUCHPAD" value="20" enum="JoyButton"> Game controller SDL touchpad button. </constant> - <constant name="JOY_BUTTON_SDL_MAX" value="21" enum="JoyButtonList"> + <constant name="JOY_BUTTON_SDL_MAX" value="21" enum="JoyButton"> The number of SDL game controller buttons. </constant> - <constant name="JOY_BUTTON_MAX" value="36" enum="JoyButtonList"> + <constant name="JOY_BUTTON_MAX" value="36" enum="JoyButton"> The maximum number of game controller buttons: Android supports up to 36 buttons. </constant> - <constant name="JOY_AXIS_INVALID" value="-1" enum="JoyAxisList"> + <constant name="JOY_AXIS_INVALID" value="-1" enum="JoyAxis"> An invalid game controller axis. </constant> - <constant name="JOY_AXIS_LEFT_X" value="0" enum="JoyAxisList"> + <constant name="JOY_AXIS_LEFT_X" value="0" enum="JoyAxis"> Game controller left joystick x-axis. </constant> - <constant name="JOY_AXIS_LEFT_Y" value="1" enum="JoyAxisList"> + <constant name="JOY_AXIS_LEFT_Y" value="1" enum="JoyAxis"> Game controller left joystick y-axis. </constant> - <constant name="JOY_AXIS_RIGHT_X" value="2" enum="JoyAxisList"> + <constant name="JOY_AXIS_RIGHT_X" value="2" enum="JoyAxis"> Game controller right joystick x-axis. </constant> - <constant name="JOY_AXIS_RIGHT_Y" value="3" enum="JoyAxisList"> + <constant name="JOY_AXIS_RIGHT_Y" value="3" enum="JoyAxis"> Game controller right joystick y-axis. </constant> - <constant name="JOY_AXIS_TRIGGER_LEFT" value="4" enum="JoyAxisList"> + <constant name="JOY_AXIS_TRIGGER_LEFT" value="4" enum="JoyAxis"> Game controller left trigger axis. </constant> - <constant name="JOY_AXIS_TRIGGER_RIGHT" value="5" enum="JoyAxisList"> + <constant name="JOY_AXIS_TRIGGER_RIGHT" value="5" enum="JoyAxis"> Game controller right trigger axis. </constant> - <constant name="JOY_AXIS_SDL_MAX" value="6" enum="JoyAxisList"> + <constant name="JOY_AXIS_SDL_MAX" value="6" enum="JoyAxis"> The number of SDL game controller axes. </constant> - <constant name="JOY_AXIS_MAX" value="10" enum="JoyAxisList"> + <constant name="JOY_AXIS_MAX" value="10" enum="JoyAxis"> The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes. </constant> - <constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MIDIMessage"> MIDI note OFF message. </constant> - <constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MIDIMessage"> MIDI note ON message. </constant> - <constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MIDIMessage"> MIDI aftertouch message. </constant> - <constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MIDIMessage"> MIDI control change message. </constant> - <constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MIDIMessage"> MIDI program change message. </constant> - <constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MIDIMessage"> MIDI channel pressure message. </constant> - <constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MidiMessageList"> + <constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MIDIMessage"> MIDI pitch bend message. </constant> <constant name="OK" value="0" enum="Error"> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 659d791ccf..d7408cd0ff 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -126,7 +126,7 @@ <argument index="1" name="axis" type="int"> </argument> <description> - Returns the current value of the joypad axis at given index (see [enum JoyAxisList]). + Returns the current value of the joypad axis at given index (see [enum JoyAxis]). </description> </method> <method name="get_joy_guid" qualifiers="const"> @@ -255,7 +255,7 @@ <argument index="1" name="button" type="int"> </argument> <description> - Returns [code]true[/code] if you are pressing the joypad button (see [enum JoyButtonList]). + Returns [code]true[/code] if you are pressing the joypad button (see [enum JoyButton]). </description> </method> <method name="is_joy_known"> @@ -273,7 +273,7 @@ <argument index="0" name="keycode" type="int"> </argument> <description> - Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum KeyList] constant. + Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum Key] constant. </description> </method> <method name="is_mouse_button_pressed" qualifiers="const"> @@ -282,7 +282,7 @@ <argument index="0" name="button" type="int"> </argument> <description> - Returns [code]true[/code] if you are pressing the mouse button specified with [enum ButtonList]. + Returns [code]true[/code] if you are pressing the mouse button specified with [enum MouseButton]. </description> </method> <method name="joy_connection_changed"> diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml index 6ab4942f85..b1f4836f6e 100644 --- a/doc/classes/InputEventJoypadButton.xml +++ b/doc/classes/InputEventJoypadButton.xml @@ -13,7 +13,7 @@ </methods> <members> <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0"> - Button identifier. One of the [enum JoyButtonList] button constants. + Button identifier. One of the [enum JoyButton] button constants. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the button's state is pressed. If [code]false[/code], the button's state is released. diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml index 2d7787b568..39fdb14016 100644 --- a/doc/classes/InputEventJoypadMotion.xml +++ b/doc/classes/InputEventJoypadMotion.xml @@ -13,7 +13,7 @@ </methods> <members> <member name="axis" type="int" setter="set_axis" getter="get_axis" default="0"> - Axis identifier. Use one of the [enum JoyAxisList] axis constants. + Axis identifier. Use one of the [enum JoyAxis] axis constants. </member> <member name="axis_value" type="float" setter="set_axis_value" getter="get_axis_value" default="0.0"> Current position of the joystick on the given axis. The value ranges from [code]-1.0[/code] to [code]1.0[/code]. A value of [code]0[/code] means the axis is in its resting position. diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index fe91b9c13e..9f2b829823 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -32,11 +32,11 @@ If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down. </member> <member name="keycode" type="int" setter="set_keycode" getter="get_keycode" default="0"> - The key keycode, which corresponds to one of the [enum KeyList] constants. Represent key in the current keyboard layout. + The key keycode, which corresponds to one of the [enum Key] constants. Represent key in the current keyboard layout. To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey]. </member> <member name="physical_keycode" type="int" setter="set_physical_keycode" getter="get_physical_keycode" default="0"> - Key physical keycode, which corresponds to one of the [enum KeyList] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard. + Key physical keycode, which corresponds to one of the [enum Key] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard. To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey]. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index 31e82bbaed..e54c3224da 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -13,7 +13,7 @@ </methods> <members> <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="0"> - The mouse button mask identifier, one of or a bitwise combination of the [enum ButtonList] button masks. + 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 )"> The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0. diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index d7b64a9a2d..d7e92f8bca 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -13,7 +13,7 @@ </methods> <members> <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0"> - The mouse button identifier, one of the [enum ButtonList] button or button wheel constants. + The mouse button identifier, one of the [enum MouseButton] button or button wheel constants. </member> <member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick" default="false"> If [code]true[/code], the mouse button's state is a double-click. diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml index a4a86cc22a..5d8c23bd6f 100644 --- a/doc/classes/XRController3D.xml +++ b/doc/classes/XRController3D.xml @@ -62,7 +62,7 @@ <argument index="0" name="button" type="int"> </argument> <description> - Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoyButtonList]. + Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoyButton]. </description> </method> </methods> diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot index 4cd89924ee..d14b0d9b1f 100644 --- a/doc/translations/classes.pot +++ b/doc/translations/classes.pot @@ -25583,7 +25583,7 @@ msgstr "" #: doc/classes/Input.xml:99 msgid "" "Returns the current value of the joypad axis at given index (see [enum " -"JoyAxisList])." +"JoyAxis])." msgstr "" #: doc/classes/Input.xml:108 @@ -25592,7 +25592,7 @@ msgstr "" #: doc/classes/Input.xml:117 msgid "" -"Receives a [enum JoyAxisList] axis and returns its equivalent name as a " +"Receives a [enum JoyAxis] axis and returns its equivalent name as a " "string." msgstr "" @@ -25602,7 +25602,7 @@ msgstr "" #: doc/classes/Input.xml:135 msgid "" -"Receives a gamepad button from [enum JoyButtonList] and returns its " +"Receives a gamepad button from [enum JoyButton] and returns its " "equivalent name as a string." msgstr "" @@ -25677,7 +25677,7 @@ msgstr "" #: doc/classes/Input.xml:238 msgid "" "Returns [code]true[/code] if you are pressing the joypad button (see [enum " -"JoyButtonList])." +"JoyButton])." msgstr "" #: doc/classes/Input.xml:247 @@ -26077,7 +26077,7 @@ msgid "" msgstr "" #: doc/classes/InputEventJoypadButton.xml:16 -msgid "Button identifier. One of the [enum JoyButtonList] button constants." +msgid "Button identifier. One of the [enum JoyButton] button constants." msgstr "" #: doc/classes/InputEventJoypadButton.xml:19 @@ -26105,7 +26105,7 @@ msgid "" msgstr "" #: doc/classes/InputEventJoypadMotion.xml:16 -msgid "Axis identifier. Use one of the [enum JoyAxisList] axis constants." +msgid "Axis identifier. Use one of the [enum JoyAxis] axis constants." msgstr "" #: doc/classes/InputEventJoypadMotion.xml:19 @@ -60259,7 +60259,7 @@ msgstr "" #: doc/classes/XRController3D.xml:65 msgid "" "Returns [code]true[/code] if the button at index [code]button[/code] is " -"pressed. See [enum JoyButtonList]." +"pressed. See [enum JoyButton]." msgstr "" #: doc/classes/XRController3D.xml:71 diff --git a/doc/translations/fr.po b/doc/translations/fr.po index c4fe08e67b..f3e26ebc61 100644 --- a/doc/translations/fr.po +++ b/doc/translations/fr.po @@ -25946,7 +25946,7 @@ msgstr "" #: doc/classes/Input.xml:99 msgid "" "Returns the current value of the joypad axis at given index (see [enum " -"JoyAxisList])." +"JoyAxis])." msgstr "" #: doc/classes/Input.xml:108 @@ -25955,7 +25955,7 @@ msgstr "" #: doc/classes/Input.xml:117 msgid "" -"Receives a [enum JoyAxisList] axis and returns its equivalent name as a " +"Receives a [enum JoyAxis] axis and returns its equivalent name as a " "string." msgstr "" @@ -25965,7 +25965,7 @@ msgstr "" #: doc/classes/Input.xml:135 msgid "" -"Receives a gamepad button from [enum JoyButtonList] and returns its " +"Receives a gamepad button from [enum JoyButton] and returns its " "equivalent name as a string." msgstr "" @@ -26041,7 +26041,7 @@ msgstr "" #, fuzzy msgid "" "Returns [code]true[/code] if you are pressing the joypad button (see [enum " -"JoyButtonList])." +"JoyButton])." msgstr "" "Retourne [code]true[/code] (vrai) si la chaîne de caractères finit par la " "chaîne de caractères donnée." @@ -26443,7 +26443,7 @@ msgid "" msgstr "" #: doc/classes/InputEventJoypadButton.xml:16 -msgid "Button identifier. One of the [enum JoyButtonList] button constants." +msgid "Button identifier. One of the [enum JoyButton] button constants." msgstr "" #: doc/classes/InputEventJoypadButton.xml:19 @@ -26471,7 +26471,7 @@ msgid "" msgstr "" #: doc/classes/InputEventJoypadMotion.xml:16 -msgid "Axis identifier. Use one of the [enum JoyAxisList] axis constants." +msgid "Axis identifier. Use one of the [enum JoyAxis] axis constants." msgstr "" #: doc/classes/InputEventJoypadMotion.xml:19 @@ -60738,7 +60738,7 @@ msgstr "" #, fuzzy msgid "" "Returns [code]true[/code] if the button at index [code]button[/code] is " -"pressed. See [enum JoyButtonList]." +"pressed. See [enum JoyButton]." msgstr "" "Renvoie [code]true[/code] (vrai) si [code]s[/code] vaut zéro ou quasiment " "zéro." diff --git a/modules/gdnative/xr/xr_interface_gdnative.cpp b/modules/gdnative/xr/xr_interface_gdnative.cpp index 5bbf70174c..1d5a9d98f8 100644 --- a/modules/gdnative/xr/xr_interface_gdnative.cpp +++ b/modules/gdnative/xr/xr_interface_gdnative.cpp @@ -398,7 +398,7 @@ void GDAPI godot_xr_set_controller_axis(godot_int p_controller_id, godot_int p_a if (tracker != nullptr) { int joyid = tracker->get_joy_id(); if (joyid != -1) { - Input::JoyAxis jx; + Input::JoyAxisValue jx; jx.min = p_can_be_negative ? -1 : 0; jx.value = p_value; input->joy_axis(joyid, p_axis, jx); diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp index 74789fc98e..10076327e2 100644 --- a/modules/webxr/webxr_interface_js.cpp +++ b/modules/webxr/webxr_interface_js.cpp @@ -416,7 +416,7 @@ void WebXRInterfaceJS::_update_tracker(int p_controller_id) { int *axes = godot_webxr_get_controller_axes(p_controller_id); if (axes) { for (int i = 0; i < axes[0]; i++) { - Input::JoyAxis joy_axis; + Input::JoyAxisValue joy_axis; joy_axis.min = -1; joy_axis.value = *((float *)axes + (i + 1)); input->joy_axis(p_controller_id + 100, i, joy_axis); diff --git a/platform/android/display_server_android.cpp b/platform/android/display_server_android.cpp index ab28afe950..dd001baba9 100644 --- a/platform/android/display_server_android.cpp +++ b/platform/android/display_server_android.cpp @@ -477,7 +477,7 @@ void DisplayServerAndroid::process_joy_event(DisplayServerAndroid::JoypadEvent p Input::get_singleton()->joy_button(p_event.device, p_event.index, p_event.pressed); break; case JOY_EVENT_AXIS: - Input::JoyAxis value; + Input::JoyAxisValue value; value.min = -1; value.value = p_event.value; Input::get_singleton()->joy_axis(p_event.device, p_event.index, value); diff --git a/platform/iphone/joypad_iphone.mm b/platform/iphone/joypad_iphone.mm index a0f0eee5d3..45842b38aa 100644 --- a/platform/iphone/joypad_iphone.mm +++ b/platform/iphone/joypad_iphone.mm @@ -287,7 +287,7 @@ void JoypadIPhone::start_processing() { gamepad.dpad.right.isPressed); }; - Input::JoyAxis jx; + Input::JoyAxisValue jx; jx.min = -1; if (element == gamepad.leftThumbstick) { jx.value = gamepad.leftThumbstick.xAxis.value; diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp index ff8ac82538..c10fb40ecb 100644 --- a/platform/javascript/display_server_javascript.cpp +++ b/platform/javascript/display_server_javascript.cpp @@ -601,7 +601,7 @@ void DisplayServerJavaScript::process_joypads() { // Buttons 6 and 7 in the standard mapping need to be // axis to be handled as JOY_AXIS_TRIGGER by Godot. if (s_standard && (b == 6 || b == 7)) { - Input::JoyAxis joy_axis; + Input::JoyAxisValue joy_axis; joy_axis.min = 0; joy_axis.value = value; int a = b == 6 ? JOY_AXIS_TRIGGER_LEFT : JOY_AXIS_TRIGGER_RIGHT; @@ -611,7 +611,7 @@ void DisplayServerJavaScript::process_joypads() { } } for (int a = 0; a < s_axes_num; a++) { - Input::JoyAxis joy_axis; + Input::JoyAxisValue joy_axis; joy_axis.min = -1; joy_axis.value = s_axes[a]; input->joy_axis(idx, a, joy_axis); diff --git a/platform/linuxbsd/joypad_linux.cpp b/platform/linuxbsd/joypad_linux.cpp index 471259e50f..8ea0f6c246 100644 --- a/platform/linuxbsd/joypad_linux.cpp +++ b/platform/linuxbsd/joypad_linux.cpp @@ -62,7 +62,7 @@ void JoypadLinux::Joypad::reset() { dpad = 0; fd = -1; - Input::JoyAxis jx; + Input::JoyAxisValue jx; jx.min = -1; jx.value = 0.0f; for (int i = 0; i < MAX_ABS; i++) { @@ -428,10 +428,10 @@ void JoypadLinux::joypad_vibration_stop(int p_id, uint64_t p_timestamp) { joy.ff_effect_timestamp = p_timestamp; } -Input::JoyAxis JoypadLinux::axis_correct(const input_absinfo *p_abs, int p_value) const { +Input::JoyAxisValue JoypadLinux::axis_correct(const input_absinfo *p_abs, int p_value) const { int min = p_abs->minimum; int max = p_abs->maximum; - Input::JoyAxis jx; + Input::JoyAxisValue jx; if (min < 0) { jx.min = -1; @@ -513,7 +513,7 @@ void JoypadLinux::process_joypads() { return; } if (joy->abs_map[ev.code] != -1 && joy->abs_info[ev.code]) { - Input::JoyAxis value = axis_correct(joy->abs_info[ev.code], ev.value); + Input::JoyAxisValue value = axis_correct(joy->abs_info[ev.code], ev.value); joy->curr_axis[joy->abs_map[ev.code]] = value; } break; diff --git a/platform/linuxbsd/joypad_linux.h b/platform/linuxbsd/joypad_linux.h index b0d0db047b..177d7a51ce 100644 --- a/platform/linuxbsd/joypad_linux.h +++ b/platform/linuxbsd/joypad_linux.h @@ -53,7 +53,7 @@ private: }; struct Joypad { - Input::JoyAxis curr_axis[MAX_ABS]; + Input::JoyAxisValue curr_axis[MAX_ABS]; int key_map[MAX_KEY]; int abs_map[MAX_ABS]; int dpad = 0; @@ -97,7 +97,7 @@ private: void joypad_vibration_start(int p_id, float p_weak_magnitude, float p_strong_magnitude, float p_duration, uint64_t p_timestamp); void joypad_vibration_stop(int p_id, uint64_t p_timestamp); - Input::JoyAxis axis_correct(const input_absinfo *p_abs, int p_value) const; + Input::JoyAxisValue axis_correct(const input_absinfo *p_abs, int p_value) const; }; #endif diff --git a/platform/osx/joypad_osx.cpp b/platform/osx/joypad_osx.cpp index 0b6a0e20a6..b12526915f 100644 --- a/platform/osx/joypad_osx.cpp +++ b/platform/osx/joypad_osx.cpp @@ -433,8 +433,8 @@ void JoypadOSX::poll_joypads() const { } } -static const Input::JoyAxis axis_correct(int p_value, int p_min, int p_max) { - Input::JoyAxis jx; +static const Input::JoyAxisValue axis_correct(int p_value, int p_min, int p_max) { + Input::JoyAxisValue jx; if (p_min < 0) { jx.min = -1; if (p_value < 0) { diff --git a/platform/uwp/joypad_uwp.cpp b/platform/uwp/joypad_uwp.cpp index 5da90db49d..b419fb4fae 100644 --- a/platform/uwp/joypad_uwp.cpp +++ b/platform/uwp/joypad_uwp.cpp @@ -134,8 +134,8 @@ void JoypadUWP::OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Inp input->joy_connection_changed(idx, false, "Xbox Controller"); } -InputDefault::JoyAxis JoypadUWP::axis_correct(double p_val, bool p_negate, bool p_trigger) const { - InputDefault::JoyAxis jx; +InputDefault::JoyAxisValue JoypadUWP::axis_correct(double p_val, bool p_negate, bool p_trigger) const { + InputDefault::JoyAxisValue jx; jx.min = p_trigger ? 0 : -1; jx.value = (float)(p_negate ? -p_val : p_val); diff --git a/platform/uwp/joypad_uwp.h b/platform/uwp/joypad_uwp.h index 5df4a211ac..d760d9e2fe 100644 --- a/platform/uwp/joypad_uwp.h +++ b/platform/uwp/joypad_uwp.h @@ -73,7 +73,7 @@ private: void OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value); void OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value); - InputDefault::JoyAxis axis_correct(double p_val, bool p_negate = false, bool p_trigger = false) const; + InputDefault::JoyAxisValue axis_correct(double p_val, bool p_negate = false, bool p_trigger = false) const; void joypad_vibration_start(int p_device, float p_weak_magnitude, float p_strong_magnitude, float p_duration, uint64_t p_timestamp); void joypad_vibration_stop(int p_device, uint64_t p_timestamp); }; diff --git a/platform/windows/joypad_windows.cpp b/platform/windows/joypad_windows.cpp index b8679a87fe..da36dc1f2b 100644 --- a/platform/windows/joypad_windows.cpp +++ b/platform/windows/joypad_windows.cpp @@ -446,8 +446,8 @@ void JoypadWindows::post_hat(int p_device, DWORD p_dpad) { input->joy_hat(p_device, dpad_val); }; -Input::JoyAxis JoypadWindows::axis_correct(int p_val, bool p_xinput, bool p_trigger, bool p_negate) const { - Input::JoyAxis jx; +Input::JoyAxisValue JoypadWindows::axis_correct(int p_val, bool p_xinput, bool p_trigger, bool p_negate) const { + Input::JoyAxisValue jx; if (Math::abs(p_val) < MIN_JOY_AXIS) { jx.min = p_trigger ? 0 : -1; jx.value = 0.0f; diff --git a/platform/windows/joypad_windows.h b/platform/windows/joypad_windows.h index 4727b4a14c..757fb54fb3 100644 --- a/platform/windows/joypad_windows.h +++ b/platform/windows/joypad_windows.h @@ -132,7 +132,7 @@ private: void joypad_vibration_start_xinput(int p_device, float p_weak_magnitude, float p_strong_magnitude, float p_duration, uint64_t p_timestamp); void joypad_vibration_stop_xinput(int p_device, uint64_t p_timestamp); - Input::JoyAxis axis_correct(int p_val, bool p_xinput = false, bool p_trigger = false, bool p_negate = false) const; + Input::JoyAxisValue axis_correct(int p_val, bool p_xinput = false, bool p_trigger = false, bool p_negate = false) const; XInputGetState_t xinput_get_state; XInputSetState_t xinput_set_state; }; |