Skip to content
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

refresh frame of buttons doesnt work #499

Open
LuisBonsembiante opened this issue Mar 16, 2018 · 9 comments
Open

refresh frame of buttons doesnt work #499

LuisBonsembiante opened this issue Mar 16, 2018 · 9 comments

Comments

@LuisBonsembiante
Copy link

  • A bug in the API:
    • Phaser version(s):Phaser CE
    • What should happen: Button input.enabled= false/true take the correct frame;
    • What happens instead: Just mantain the down frame dont refresh when enabled again
@samme
Copy link
Collaborator

samme commented Mar 16, 2018

Do you know if it has ever worked that way?

@LuisBonsembiante
Copy link
Author

I dont know but must be...if you need change the frameName in dynamic way is a bad design.

@photonstorm
Copy link
Collaborator

No, it has never worked like this. Button frames should be linked to input events really, so if the button is re-enabled AND the pointer isn’t over it, only then should it change the frame.

@LuisBonsembiante
Copy link
Author

ok thanks I will change the framename manually if states change

@photonstorm
Copy link
Collaborator

I think it's a good idea, I just think it needs to check both things (enabled + over) before changing frame.

@LuisBonsembiante
Copy link
Author

Thanks @photonstorm your awesome

@LuisBonsembiante
Copy link
Author

Hi guys, Hi @photonstorm .. I have an issue for this....I implemented the solution but the button doesnt refresh the frame inmediately.. the refresh happen in some opportunities whe I move de pointer... I dont know what is the bug...could you help me?.

@LuisBonsembiante
Copy link
Author

Hi guys any thought about this?....thanks in advance. @photonstorm

@LuisBonsembiante
Copy link
Author

I found the error, I just replaced element.input.enabled for element.inputEnabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants