0 votes

During first-runt set-up of my game there are some processes that can take 2-3 seconds. I want to display the "wait" mouse cursor during those processes. I can't find a wait to do that.

What am I missing?

Godot version v3.4.4.stable.official [419e713a2]
in Engine by (70 points)

2 Answers

0 votes

You can set the mouse cursor to any custom design you want like this

var cursor_bespoke = load("res://Mouse.png")

func _ready():
    Input.set_custom_mouse_cursor(cursor_bespoke)
by (1,635 points)

Thank you for the reply. I know I can set a custom cursor.

Input.CursorShape.CURSOR_WAIT implies to me there is already a built-in cursor shape for "input wait mode".

See https://docs.godotengine.org/en/stable/classes/class_input.html

I can get the current cursor shape by calling Input.getcurrentcusorshape(), I can set the default cursor shape by calling Input.setdefaultcursorshape (cursor_shape).

There just doesn't seem to be a way to set the current cursor shape using the Input.CursorShape enum values.

Okay you could try

Input.set_default_cursor_shape(4)

I think that is what you want then

0 votes

It works fine in mine project :

Input.set_default_cursor_shape(Input.CURSOR_ARROW)

Maybe the problem lies in those 3 seconds entirely freezing viewport ?

by (5,653 points)

Input.CURSOR_ARROW seems to be the system default. Try

Input.setdefaultcursorshape(Input.CURSORBUSY).

Does not work for me.

I just tried it and it works...
but strangely enough, it is not Gogots custom wait cursor, but it is waiting cursor animation of my current Windows system !
Could it be, that Godot reaches system information and forces it to display its cursor sprite ? What system do You use ?

I'm on Windows 11. Since it's a small UX issue I'm not going to chase it for now. Too much other work to complete. When time allows I'll dig into it deeper unless someone can explain exactly how to programmatically control the cursor shape.

Thanks for your help.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.