diff options
author | Kostadin Damyanov <maxmight@gmail.com> | 2015-10-13 05:01:54 +0300 |
---|---|---|
committer | Kostadin Damyanov <maxmight@gmail.com> | 2015-10-13 05:01:54 +0300 |
commit | 29caf2bb5be061cd1ab014cf938f2c71d0bd2663 (patch) | |
tree | 859a0c3d2805198672c1e22d4780c3eb68f55a57 /core/os/input.h | |
parent | c5f574b914b3cb11d97ae616df4a0bced45bb17c (diff) | |
parent | 79e5ced7e668fa53567ac6aaf5a26393cea6c9a2 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'core/os/input.h')
-rw-r--r-- | core/os/input.h | 73 |
1 files changed, 2 insertions, 71 deletions
diff --git a/core/os/input.h b/core/os/input.h index 5c69ced825..8aa0e6b18a 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -80,82 +80,13 @@ public: virtual bool is_emulating_touchscreen() const=0; + 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; Input(); }; VARIANT_ENUM_CAST(Input::MouseMode); -class InputDefault : public Input { - - OBJ_TYPE( InputDefault, Input ); - _THREAD_SAFE_CLASS_ - - int mouse_button_mask; - Set<int> keys_pressed; - Set<int> joy_buttons_pressed; - Map<int,float> joy_axis; - Map<StringName,int> custom_action_press; - Map<int, String> joy_names; - Vector3 accelerometer; - Vector2 mouse_pos; - MainLoop *main_loop; - - bool emulate_touch; - - struct SpeedTrack { - - uint64_t last_tick; - Vector2 speed; - Vector2 accum; - float accum_t; - float min_ref_frame; - float max_ref_frame; - - void update(const Vector2& p_delta_p); - void reset(); - SpeedTrack(); - }; - - SpeedTrack mouse_speed_track; - -public: - - virtual bool is_key_pressed(int p_scancode); - virtual bool is_mouse_button_pressed(int p_button); - virtual bool is_joy_button_pressed(int p_device, int p_button); - virtual bool is_action_pressed(const StringName& p_action); - - virtual float get_joy_axis(int p_device,int p_axis); - String get_joy_name(int p_idx); - void joy_connection_changed(int p_idx, bool p_connected, String p_name); - - virtual Vector3 get_accelerometer(); - - virtual Point2 get_mouse_pos() const; - virtual Point2 get_mouse_speed() const; - virtual int get_mouse_button_mask() const; - - virtual void warp_mouse_pos(const Vector2& p_to); - - - void parse_input_event(const InputEvent& p_event); - void set_accelerometer(const Vector3& p_accel); - void set_joy_axis(int p_device,int p_axis,float p_value); - - void set_main_loop(MainLoop *main_loop); - void set_mouse_pos(const Point2& p_posf); - - void action_press(const StringName& p_action); - void action_release(const StringName& p_action); - - void iteration(float p_step); - - void set_emulate_touch(bool p_emulate); - virtual bool is_emulating_touchscreen() const; - - InputDefault(); - -}; #endif // INPUT_H |