1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Add Input::get_current_cursor_shape

[Clean up] Removed unused/unnecessary methods.

(cherry picked from commit 1bae73d7d0)
This commit is contained in:
Guilherme Felipe
2019-04-15 12:30:20 -03:00
committed by Rémi Verschelde
parent 717c492eb6
commit 8ef5052967
22 changed files with 54 additions and 63 deletions

View File

@@ -627,7 +627,8 @@ bool InputDefault::is_emulating_mouse_from_touch() const {
return emulate_mouse_from_touch;
}
Input::CursorShape InputDefault::get_default_cursor_shape() {
Input::CursorShape InputDefault::get_default_cursor_shape() const {
return default_shape;
}
@@ -646,6 +647,11 @@ void InputDefault::set_default_cursor_shape(CursorShape p_shape) {
parse_input_event(mm);
}
Input::CursorShape InputDefault::get_current_cursor_shape() const {
return (Input::CursorShape)OS::get_singleton()->get_cursor_shape();
}
void InputDefault::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
if (Engine::get_singleton()->is_editor_hint())
return;
@@ -653,21 +659,6 @@ void InputDefault::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_sh
OS::get_singleton()->set_custom_mouse_cursor(p_cursor, (OS::CursorShape)p_shape, p_hotspot);
}
void InputDefault::set_mouse_in_window(bool p_in_window) {
/* no longer supported, leaving this for reference to anyone who might want to implement hardware cursors
if (custom_cursor.is_valid()) {
if (p_in_window) {
set_mouse_mode(MOUSE_MODE_HIDDEN);
VisualServer::get_singleton()->cursor_set_visible(true);
} else {
set_mouse_mode(MOUSE_MODE_VISIBLE);
VisualServer::get_singleton()->cursor_set_visible(false);
}
}
*/
}
void InputDefault::accumulate_input_event(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());