diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-08 17:05:51 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-08 17:06:33 -0300 |
commit | 547a57777b199f451305a6d4b6ad63fb0b2bd3ed (patch) | |
tree | 9fb9ce5851ea3ccc39c6ebce607ceeca771fd991 /core/os/input_event.cpp | |
parent | 6323779596dea0db7f58afef7d3d3d5588ef20cb (diff) |
renamed joystick to joypad everywhere around source code!
Diffstat (limited to 'core/os/input_event.cpp')
-rw-r--r-- | core/os/input_event.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index b0008a0481..5c681f1a82 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -61,10 +61,10 @@ bool InputEvent::operator==(const InputEvent &p_event) const { && mouse_button.button_index == p_event.mouse_button.button_index && mouse_button.button_mask == p_event.mouse_button.button_mask && key.mod == p_event.key.mod; - case JOYSTICK_MOTION: + case JOYPAD_MOTION: return joy_motion.axis == p_event.joy_motion.axis && joy_motion.axis_value == p_event.joy_motion.axis_value; - case JOYSTICK_BUTTON: + case JOYPAD_BUTTON: return joy_button.pressed == p_event.joy_button.pressed && joy_button.button_index == p_event.joy_button.button_index && joy_button.pressure == p_event.joy_button.pressure; @@ -155,14 +155,14 @@ InputEvent::operator String() const { return str; } break; - case JOYSTICK_MOTION: { - str+= "Event: JoystickMotion "; + case JOYPAD_MOTION: { + str+= "Event: JoypadMotion "; str=str+"Axis: "+itos(joy_motion.axis)+" Value: " +rtos(joy_motion.axis_value); return str; } break; - case JOYSTICK_BUTTON: { - str+= "Event: JoystickButton "; + case JOYPAD_BUTTON: { + str+= "Event: JoypadButton "; str=str+"Pressed: "+itos(joy_button.pressed)+" Index: " +itos(joy_button.button_index)+" pressure "+rtos(joy_button.pressure); return str; @@ -203,9 +203,9 @@ bool InputEvent::is_pressed() const { case KEY: return key.pressed; case MOUSE_BUTTON: return mouse_button.pressed; - case JOYSTICK_BUTTON: return joy_button.pressed; + case JOYPAD_BUTTON: return joy_button.pressed; case SCREEN_TOUCH: return screen_touch.pressed; - case JOYSTICK_MOTION: return ABS(joy_motion.axis_value) > 0.5; + case JOYPAD_MOTION: return ABS(joy_motion.axis_value) > 0.5; case ACTION: return action.pressed; default: {} } |