Merge pull request #17196 from RandomShaper/improve-gui-touch

Implement universal translation of touch to mouse (3.1)
This commit is contained in:
Rémi Verschelde 2018-05-02 10:47:49 +02:00 committed by GitHub
commit 18c28c159d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 222 additions and 225 deletions

View file

@ -118,7 +118,8 @@ public:
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
virtual bool is_emulating_touchscreen() const = 0;
virtual bool is_emulating_touch_from_mouse() const = 0;
virtual bool is_emulating_mouse_from_touch() const = 0;
virtual CursorShape get_default_cursor_shape() = 0;
virtual void set_default_cursor_shape(CursorShape p_shape) = 0;

View file

@ -411,7 +411,7 @@ Error OS::set_cwd(const String &p_cwd) {
bool OS::has_touchscreen_ui_hint() const {
//return false;
return Input::get_singleton() && Input::get_singleton()->is_emulating_touchscreen();
return Input::get_singleton() && Input::get_singleton()->is_emulating_touch_from_mouse();
}
int OS::get_free_static_memory() const {