deep-entertainment / issues

Issue tracker for deep Entertainment projects
1 stars 0 forks source link

[EGOVENTURE] Speedy is showing old cursor shape for a split second when unhiding Speedy #30

Closed ThmsKnz closed 1 year ago

ThmsKnz commented 1 year ago

Please make sure you talk to the community before creating an issue.

Describe the bug When unhiding the cursor with Speedy.hidden = false it can happen that the cursor is still showing an old shape for a glimpse of a second before it gets updated by CheckCursor.

To Reproduce Steps to reproduce the behavior: If the ready function of a new scene contains a timeout, for example like this:

    EgoVenture.interactive = false
    yield(get_tree().create_timer(1), "timeout")
    EgoVenture.interactive = true

then the cursor of the previous scene is being shown when Speedy.hidden = false is processed. In the next CheckCursor singleton process cycle the cursor shape is then being updated to the correct shape.

This could be prevented when the cursor in Speedy would also get updated while the cursor is hidden. I tested it by changing in speedy.gd function set_shape line if not is_touch and not hidden: to if not is_touch:

Then the cursor shape gets updated while the cursor is hidden and the 'blinking cursor shape' is gone.

However I am not sure whether there is/was a reason that the cursor shape wasn't getting updated when 'hidden' is set to true. Are you aware of any side effects that would prevent this correction?

Versions

dploeger commented 1 year ago

Hm. You're right. It should not cause any problems. I guess I was thinking that if the cursor is hidden, calling set_shape would not make any sense. But I wasn't thinking of this. So yes, it should work.

dploeger commented 1 year ago

I will fix this.

MikaelNyqvist commented 1 year ago

I can definitely confirm that there aren't any side effects to this. I implemented it in the Profound Red migration, which has been out for beta test now. I've also used it in my current project, without any problems whatsoever.