summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
Diffstat (limited to 'core/os')
-rw-r--r--core/os/SCsub2
-rw-r--r--core/os/input.cpp6
-rw-r--r--core/os/input.h5
-rw-r--r--core/os/input_event.cpp3
-rw-r--r--core/os/os.h1
5 files changed, 15 insertions, 2 deletions
diff --git a/core/os/SCsub b/core/os/SCsub
index 7b4a6acbc0..c2731d60e6 100644
--- a/core/os/SCsub
+++ b/core/os/SCsub
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
Import('env')
env.add_source_files(env.core_sources,"*.cpp")
diff --git a/core/os/input.cpp b/core/os/input.cpp
index 401ab7ffe2..4ab57a84ea 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -64,6 +64,10 @@ void Input::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_connected_joysticks"),&Input::get_connected_joysticks);
ObjectTypeDB::bind_method(_MD("get_joy_vibration_strength", "device"), &Input::get_joy_vibration_strength);
ObjectTypeDB::bind_method(_MD("get_joy_vibration_duration", "device"), &Input::get_joy_vibration_duration);
+ ObjectTypeDB::bind_method(_MD("get_joy_button_string", "button_index"), &Input::get_joy_button_string);
+ ObjectTypeDB::bind_method(_MD("get_joy_button_index_from_string", "button"), &Input::get_joy_button_index_from_string);
+ ObjectTypeDB::bind_method(_MD("get_joy_axis_string", "axis_index"), &Input::get_joy_axis_string);
+ ObjectTypeDB::bind_method(_MD("get_joy_axis_index_from_string", "axis"), &Input::get_joy_axis_index_from_string);
ObjectTypeDB::bind_method(_MD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration, DEFVAL(0));
ObjectTypeDB::bind_method(_MD("stop_joy_vibration", "device"), &Input::stop_joy_vibration);
ObjectTypeDB::bind_method(_MD("get_accelerometer"),&Input::get_accelerometer);
@@ -90,7 +94,7 @@ void Input::get_argument_options(const StringName& p_function,int p_idx,List<Str
#ifdef TOOLS_ENABLED
String pf=p_function;
- if (p_idx==0 && (pf=="is_action_pressed" || pf=="action_press" || pf=="action_release")) {
+ if (p_idx==0 && (pf=="is_action_pressed" || pf=="action_press" || pf=="action_release" || pf=="is_action_just_pressed" || pf=="is_action_just_released")) {
List<PropertyInfo> pinfo;
Globals::get_singleton()->get_property_list(&pinfo);
diff --git a/core/os/input.h b/core/os/input.h
index 665fb4ad99..d8f3be09df 100644
--- a/core/os/input.h
+++ b/core/os/input.h
@@ -96,6 +96,11 @@ public:
virtual void set_custom_mouse_cursor(const RES& p_cursor,const Vector2& p_hotspot=Vector2())=0;
virtual void set_mouse_in_window(bool p_in_window)=0;
+ virtual String get_joy_button_string(int p_button)=0;
+ virtual String get_joy_axis_string(int p_axis)=0;
+ virtual int get_joy_button_index_from_string(String p_button)=0;
+ virtual int get_joy_axis_index_from_string(String p_axis)=0;
+
Input();
};
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp
index 9982767be1..7350be824a 100644
--- a/core/os/input_event.cpp
+++ b/core/os/input_event.cpp
@@ -50,7 +50,8 @@ bool InputEvent::operator==(const InputEvent &p_event) const {
case MOUSE_MOTION:
return mouse_motion.x == p_event.mouse_motion.x
&& mouse_motion.y == p_event.mouse_motion.y
- && mouse_motion.relative_x == p_event.mouse_motion.relative_y
+ && mouse_motion.relative_x == p_event.mouse_motion.relative_x
+ && mouse_motion.relative_y == p_event.mouse_motion.relative_y
&& mouse_motion.button_mask == p_event.mouse_motion.button_mask
&& key.mod == p_event.key.mod;
case MOUSE_BUTTON:
diff --git a/core/os/os.h b/core/os/os.h
index 8e9293b3c8..c2b46a5420 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -372,6 +372,7 @@ public:
virtual void set_screen_orientation(ScreenOrientation p_orientation);
ScreenOrientation get_screen_orientation() const;
+ virtual void enable_for_stealing_focus(ProcessID pid) {}
virtual void move_window_to_foreground() {}
virtual void debug_break();