summaryrefslogtreecommitdiff
path: root/scene/gui/input_action.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/input_action.cpp')
-rw-r--r--scene/gui/input_action.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/scene/gui/input_action.cpp b/scene/gui/input_action.cpp
index c4e7a75298..77026dfdb1 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)+".";
@@ -109,13 +109,13 @@ bool ShortCut::is_valid() const {
void ShortCut::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_shortcut","event"),&ShortCut::set_shortcut);
- ObjectTypeDB::bind_method(_MD("get_shortcut"),&ShortCut::get_shortcut);
+ ClassDB::bind_method(_MD("set_shortcut","event"),&ShortCut::set_shortcut);
+ ClassDB::bind_method(_MD("get_shortcut"),&ShortCut::get_shortcut);
- ObjectTypeDB::bind_method(_MD("is_valid"),&ShortCut::is_valid);
+ ClassDB::bind_method(_MD("is_valid"),&ShortCut::is_valid);
- ObjectTypeDB::bind_method(_MD("is_shortcut","event"),&ShortCut::is_shortcut);
- ObjectTypeDB::bind_method(_MD("get_as_text"),&ShortCut::get_as_text);
+ ClassDB::bind_method(_MD("is_shortcut","event"),&ShortCut::is_shortcut);
+ ClassDB::bind_method(_MD("get_as_text"),&ShortCut::get_as_text);
ADD_PROPERTY(PropertyInfo(Variant::INPUT_EVENT,"shortcut"),_SCS("set_shortcut"),_SCS("get_shortcut"));
}