From a04ae000ebcdcbdbaccbd3756d43f6fc3ea90a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 4 Oct 2022 12:49:02 +0200 Subject: [PATCH] HTML5: Add missing `OS::get_cursor_shape()` implementation Fixes #66835. --- platform/javascript/os_javascript.cpp | 4 ++++ platform/javascript/os_javascript.h | 1 + 2 files changed, 5 insertions(+) diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 4c3076ac3..69cde4d2c 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -370,6 +370,10 @@ void OS_JavaScript::set_cursor_shape(CursorShape p_shape) { pandemonium_js_display_cursor_set_shape(pandemonium2dom_cursor(cursor_shape)); } +OS::CursorShape OS_JavaScript::get_cursor_shape() const { + return cursor_shape; +} + void OS_JavaScript::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) { if (p_cursor.is_valid()) { Ref texture = p_cursor; diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index ed1479106..179ee7a1f 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -147,6 +147,7 @@ public: virtual Point2 get_mouse_position() const; virtual int get_mouse_button_state() const; virtual void set_cursor_shape(CursorShape p_shape); + virtual CursorShape get_cursor_shape() const; virtual void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot); virtual void set_mouse_mode(MouseMode p_mode); virtual MouseMode get_mouse_mode() const;