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

Feature/762 pp up #763

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Feature/762 pp up #763

wants to merge 6 commits into from

Conversation

magroader
Copy link
Collaborator

No description provided.

…ey are not needed (e.g. when no move present or when boost cannot be applied)
…ug with this - if anything becomes disabled, suddenly none of the other buttons work. Why not?
@magroader magroader requested a review from Jerakin March 10, 2021 22:17
@magroader
Copy link
Collaborator Author

Closes #762

table.insert(self.move_buttons.pp_minus, {node="pp_minus_move_btn" .. i, text=txt})

-- Set nodes disabled until we confirm there's actually a move there, which we will do in the below loop
gui.set_enabled(del, false)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jerakin There is a major bug here that I cannot understand. If I set any of these to enabled=false here, or down on line 296, then none of these buttons works anymore. For example, if I delete a move, then I can't click the move again to set it. As another example, if I boost the PP to max, I can no longer reduce the PP.

If I don't do any of this set_enabled stuff, everything works fine. If I leave the screen and come back in, it works fine. For some reason it seems that setting any of these nodes to be enabled=false poisons the others.

Do you have any ideas what's going on?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is resolved! The issue was that when the button became disabled, for some reason gooey would always say we are over the button. I'm not sure if this had to do with removing and re-adding the buttons or what. Fixed by checking a.enabled and a.over to early return, rather than just a.over.

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

Successfully merging this pull request may close these issues.

1 participant