You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Fix set_default_cursor_shape always sending motion event
(cherry picked from commit 508761e0cd)
This commit is contained in:
committed by
Rémi Verschelde
parent
e384d77194
commit
71a0722035
@@ -319,7 +319,8 @@
|
|||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW].
|
Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW].
|
||||||
Note that if you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead.
|
[b]Note:[/b] If you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead.
|
||||||
|
[b]Note:[/b] This method generates an [InputEventMouseMotion] to update cursor immediately.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_mouse_mode">
|
<method name="set_mouse_mode">
|
||||||
|
|||||||
@@ -632,6 +632,10 @@ Input::CursorShape InputDefault::get_default_cursor_shape() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void InputDefault::set_default_cursor_shape(CursorShape p_shape) {
|
void InputDefault::set_default_cursor_shape(CursorShape p_shape) {
|
||||||
|
|
||||||
|
if (default_shape == p_shape)
|
||||||
|
return;
|
||||||
|
|
||||||
default_shape = p_shape;
|
default_shape = p_shape;
|
||||||
// The default shape is set in Viewport::_gui_input_event. To instantly
|
// The default shape is set in Viewport::_gui_input_event. To instantly
|
||||||
// see the shape in the viewport we need to trigger a mouse motion event.
|
// see the shape in the viewport we need to trigger a mouse motion event.
|
||||||
|
|||||||
Reference in New Issue
Block a user