-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setPollRate() no longer working in Phaser 3.8? #6754
Comments
Can you confirm you mean v3.80 please? As v3.8 was released years and years ago. |
Yes my bad, it's the most recent version, I edited the post. I googled 3.8 to check the nickname of version and didn't realize there was a different 3.8 out there. |
Just to clarify, our version numbers are sequential, you don't drop the zero - so 3.8 means 'version 8' and 3.80 means 'version 80', hence much more recent! Even so, thanks for reporting this. We'll look into it for v3.90 (not 3.9 :) ) |
@orcomarcio, from your description here's what it sounds like:
If the above is correct, here's a possible solution to try out without altering the const sprite = this.add.sprite(400, 300, 'eye').setInteractive({ cursor: 'pointer' });
sprite.on('pointerdown', function (pointer)
{
this.input.disable(sprite);
this.input.manager.resetCursor(sprite.input);
}, this); |
@zekeatchan , it's mostly the opposed problem, I need to refresh the cursor when a button gets reenabled Without fix, if my cursor is overing a disabled button, when the button becomes enabled the cursor won't turn into an hand. My workaround was to force it to refresh using the setPollRate, as i couldn't find a more direct way to do so. |
You can now re-create this by using the new |
I finally got around to try Phaser v8.85.2 and what you suggested doesn't properly work. Just using resetCursor():
Using just setPollRate(0):
Using resetCursor() and setPollRate(0) together:
I'm not sure if I'm missing something, but it feels like there is no solution to this problem unless I create something myself that handles the cursor appearence. |
Version
Description
I was testing 3.80 on my project and found out that a fix I made is no longer working. I dind't want to keep pollRate on, but i wanted my cursor to refresh if it was hovering on a button that got disabled. this was my inelegant solution:

In 3.80 this no longer works, but in 3.7 it does. I compared the codes and I found the "culprit". In the method Phaser.Input.InputPlugin#disable, manager.resetCursor(input) is no longer called.

I tried manually putting it back in and with that my fix works again. I'm not sure what I'm tampering with though so I wouldn't call this a solution. I'm just wondering if setPollRate broke.
Side Note: I tried to leave poll rate on for longer (600 instead of 60ms) to make sure it needed more time now to kick in, but this fix didn't work.
The text was updated successfully, but these errors were encountered: