diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/doc/doc_data.cpp | 2 | ||||
-rw-r--r-- | tools/editor/project_settings.cpp | 24 | ||||
-rw-r--r-- | tools/editor/property_selector.cpp | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp index f66a8aff22..c6953c82be 100644 --- a/tools/doc/doc_data.cpp +++ b/tools/doc/doc_data.cpp @@ -503,7 +503,7 @@ void DocData::generate(bool p_basic_types) { if (i==Variant::INPUT_EVENT) { static const char* ie_type[InputEvent::TYPE_MAX]={ - "","Key","MouseMotion","MouseButton","JoystickMotion","JoystickButton","ScreenTouch","ScreenDrag","Action" + "","Key","MouseMotion","MouseButton","JoypadMotion","JoypadButton","ScreenTouch","ScreenDrag","Action" }; cname+=ie_type[j]; } diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp index f16f20fb96..456f98d137 100644 --- a/tools/editor/project_settings.cpp +++ b/tools/editor/project_settings.cpp @@ -82,8 +82,8 @@ void ProjectSettings::_notification(int p_what) { translation_list->connect("button_pressed",this,"_translation_delete"); _update_actions(); popup_add->add_icon_item(get_icon("Keyboard","EditorIcons"),TTR("Key "),InputEvent::KEY);//"Key " - because the word 'key' has already been used as a key animation - popup_add->add_icon_item(get_icon("JoyButton","EditorIcons"),TTR("Joy Button"),InputEvent::JOYSTICK_BUTTON); - popup_add->add_icon_item(get_icon("JoyAxis","EditorIcons"),TTR("Joy Axis"),InputEvent::JOYSTICK_MOTION); + popup_add->add_icon_item(get_icon("JoyButton","EditorIcons"),TTR("Joy Button"),InputEvent::JOYPAD_BUTTON); + popup_add->add_icon_item(get_icon("JoyAxis","EditorIcons"),TTR("Joy Axis"),InputEvent::JOYPAD_MOTION); popup_add->add_icon_item(get_icon("Mouse","EditorIcons"),TTR("Mouse Button"),InputEvent::MOUSE_BUTTON); List<String> tfn; @@ -198,7 +198,7 @@ void ProjectSettings::_device_input_add() { } } break; - case InputEvent::JOYSTICK_MOTION: { + case InputEvent::JOYPAD_MOTION: { ie.joy_motion.axis = device_index->get_selected()>>1; ie.joy_motion.axis_value = device_index->get_selected()&1?1:-1; @@ -207,20 +207,20 @@ void ProjectSettings::_device_input_add() { for(int i=0;i<arr.size();i++) { InputEvent aie=arr[i]; - if (aie.device == ie.device && aie.type==InputEvent::JOYSTICK_MOTION && aie.joy_motion.axis==ie.joy_motion.axis && aie.joy_motion.axis_value==ie.joy_motion.axis_value) { + if (aie.device == ie.device && aie.type==InputEvent::JOYPAD_MOTION && aie.joy_motion.axis==ie.joy_motion.axis && aie.joy_motion.axis_value==ie.joy_motion.axis_value) { return; } } } break; - case InputEvent::JOYSTICK_BUTTON: { + case InputEvent::JOYPAD_BUTTON: { ie.joy_button.button_index=device_index->get_selected(); for(int i=0;i<arr.size();i++) { InputEvent aie=arr[i]; - if (aie.device == ie.device && aie.type==InputEvent::JOYSTICK_BUTTON && aie.joy_button.button_index==ie.joy_button.button_index) { + if (aie.device == ie.device && aie.type==InputEvent::JOYPAD_BUTTON && aie.joy_button.button_index==ie.joy_button.button_index) { return; } } @@ -361,10 +361,10 @@ void ProjectSettings::_add_item(int p_item){ device_index->add_item(TTR("Button 9")); device_input->popup_centered_minsize(Size2(350,95)); } break; - case InputEvent::JOYSTICK_MOTION: { + case InputEvent::JOYPAD_MOTION: { device_id->set_value(0); - device_index_label->set_text(TTR("Joystick Axis Index:")); + device_index_label->set_text(TTR("Joypad Axis Index:")); device_index->clear(); for(int i=0;i<JOY_AXIS_MAX*2;i++) { @@ -374,10 +374,10 @@ void ProjectSettings::_add_item(int p_item){ device_input->popup_centered_minsize(Size2(350,95)); } break; - case InputEvent::JOYSTICK_BUTTON: { + case InputEvent::JOYPAD_BUTTON: { device_id->set_value(3); - device_index_label->set_text(TTR("Joystick Button Index:")); + device_index_label->set_text(TTR("Joypad Button Index:")); device_index->clear(); for(int i=0;i<JOY_BUTTON_MAX;i++) { @@ -526,7 +526,7 @@ void ProjectSettings::_update_actions() { action->set_icon(0,get_icon("Keyboard","EditorIcons")); } break; - case InputEvent::JOYSTICK_BUTTON: { + case InputEvent::JOYPAD_BUTTON: { String str = TTR("Device")+" "+itos(ie.device)+", "+TTR("Button")+" "+itos(ie.joy_button.button_index); if (ie.joy_button.button_index>=0 && ie.joy_button.button_index<JOY_BUTTON_MAX) @@ -552,7 +552,7 @@ void ProjectSettings::_update_actions() { action->set_text(0,str); action->set_icon(0,get_icon("Mouse","EditorIcons")); } break; - case InputEvent::JOYSTICK_MOTION: { + case InputEvent::JOYPAD_MOTION: { int ax = ie.joy_motion.axis; int n = 2*ax + (ie.joy_motion.axis_value<0 ? 0:1); diff --git a/tools/editor/property_selector.cpp b/tools/editor/property_selector.cpp index c3e512e990..d3d1421b38 100644 --- a/tools/editor/property_selector.cpp +++ b/tools/editor/property_selector.cpp @@ -321,8 +321,8 @@ void PropertySelector::_item_selected() { case InputEvent::KEY: class_type="InputEventKey"; break; case InputEvent::MOUSE_MOTION: class_type="InputEventMouseMotion"; break; case InputEvent::MOUSE_BUTTON: class_type="InputEventMouseButton"; break; - case InputEvent::JOYSTICK_MOTION: class_type="InputEventJoystickMotion"; break; - case InputEvent::JOYSTICK_BUTTON: class_type="InputEventJoystickButton"; break; + case InputEvent::JOYPAD_MOTION: class_type="InputEventJoypadMotion"; break; + case InputEvent::JOYPAD_BUTTON: class_type="InputEventJoypadButton"; break; case InputEvent::SCREEN_TOUCH: class_type="InputEventScreenTouch"; break; case InputEvent::SCREEN_DRAG: class_type="InputEventScreenDrag"; break; case InputEvent::ACTION: class_type="InputEventAction"; break; |