diff options
| author | Juan Linietsky | 2017-01-08 17:05:51 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-01-08 17:06:33 -0300 |
| commit | 547a57777b199f451305a6d4b6ad63fb0b2bd3ed (patch) | |
| tree | 9fb9ce5851ea3ccc39c6ebce607ceeca771fd991 /scene | |
| parent | 6323779596dea0db7f58afef7d3d3d5588ef20cb (diff) | |
| download | godot-547a577.tar.gz godot-547a577.tar.zst godot-547a577.zip | |
renamed joystick to joypad everywhere around source code!
Diffstat (limited to 'scene')
| -rw-r--r-- | scene/gui/base_button.cpp | 2 | ||||
| -rw-r--r-- | scene/gui/input_action.cpp | 8 | ||||
| -rw-r--r-- | scene/gui/menu_button.cpp | 2 | ||||
| -rw-r--r-- | scene/main/scene_main_loop.cpp | 2 | ||||
| -rw-r--r-- | scene/main/viewport.cpp | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 1f5296e9d..49cd7758d 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -156,7 +156,7 @@ void BaseButton::_gui_input(InputEvent p_event) { } } break; case InputEvent::ACTION: - case InputEvent::JOYSTICK_BUTTON: + case InputEvent::JOYPAD_BUTTON: case InputEvent::KEY: { diff --git a/scene/gui/input_action.cpp b/scene/gui/input_action.cpp index 501f39a7c..77026dfdb 100644 --- a/scene/gui/input_action.cpp +++ b/scene/gui/input_action.cpp @@ -24,7 +24,7 @@ bool ShortCut::is_shortcut(const InputEvent& p_event) const { same=(shortcut.key.scancode==p_event.key.scancode && shortcut.key.mod == p_event.key.mod); } break; - case InputEvent::JOYSTICK_BUTTON: { + case InputEvent::JOYPAD_BUTTON: { same=(shortcut.joy_button.button_index==p_event.joy_button.button_index); @@ -34,7 +34,7 @@ bool ShortCut::is_shortcut(const InputEvent& p_event) const { same=(shortcut.mouse_button.button_index==p_event.mouse_button.button_index); } break; - case InputEvent::JOYSTICK_MOTION: { + case InputEvent::JOYPAD_MOTION: { same=(shortcut.joy_motion.axis==p_event.joy_motion.axis && (shortcut.joy_motion.axis_value < 0) == (p_event.joy_motion.axis_value < 0)); @@ -69,7 +69,7 @@ String ShortCut::get_as_text() const { return str; } break; - case InputEvent::JOYSTICK_BUTTON: { + case InputEvent::JOYPAD_BUTTON: { String str = RTR("Device")+" "+itos(shortcut.device)+", "+RTR("Button")+" "+itos(shortcut.joy_button.button_index); str+="."; @@ -90,7 +90,7 @@ String ShortCut::get_as_text() const { return str; } break; - case InputEvent::JOYSTICK_MOTION: { + case InputEvent::JOYPAD_MOTION: { int ax = shortcut.joy_motion.axis; String str = RTR("Device")+" "+itos(shortcut.device)+", "+RTR("Axis")+" "+itos(ax)+"."; diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index a96a39083..755b29666 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -34,7 +34,7 @@ void MenuButton::_unhandled_key_input(InputEvent p_event) { - if (p_event.is_pressed() && !p_event.is_echo() && (p_event.type==InputEvent::KEY || p_event.type==InputEvent::ACTION || p_event.type==InputEvent::JOYSTICK_BUTTON)) { + if (p_event.is_pressed() && !p_event.is_echo() && (p_event.type==InputEvent::KEY || p_event.type==InputEvent::ACTION || p_event.type==InputEvent::JOYPAD_BUTTON)) { if (!get_parent() || !is_visible() || is_disabled()) return; diff --git a/scene/main/scene_main_loop.cpp b/scene/main/scene_main_loop.cpp index a6ef136b8..418f4362b 100644 --- a/scene/main/scene_main_loop.cpp +++ b/scene/main/scene_main_loop.cpp @@ -366,7 +366,7 @@ void SceneTree::input_text( const String& p_text ) { void SceneTree::input_event( const InputEvent& p_event ) { - if (is_editor_hint() && (p_event.type==InputEvent::JOYSTICK_MOTION || p_event.type==InputEvent::JOYSTICK_BUTTON)) + if (is_editor_hint() && (p_event.type==InputEvent::JOYPAD_MOTION || p_event.type==InputEvent::JOYPAD_BUTTON)) return; //avoid joy input on editor root_lock++; diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index e71426c4f..4c7114d09 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2086,8 +2086,8 @@ void Viewport::_gui_input_event(InputEvent p_event) { } break; case InputEvent::ACTION: - case InputEvent::JOYSTICK_BUTTON: - case InputEvent::JOYSTICK_MOTION: + case InputEvent::JOYPAD_BUTTON: + case InputEvent::JOYPAD_MOTION: case InputEvent::KEY: { |
