SpoutDev/Spout — Issue #857: GenericPopup.setDirty(true) prevents popup screen from being closed normally
Author: Brettflan
Created: 2011-11-02 02:00:20+00:00
State: open

This is with Spout 510 and Spoutcraft 718.

After the most recent Spoutcraft and Spout updates, a new issue has popped up with my TexturePackMenu plugin. After a player running the Spoutcraft client moves between pages in the GenericPopup menu (which effectively just changes the text of buttons, enables/disables buttons, and sets buttons to visible/invisible), the menu can no longer be closed in the client by GenericPopup.close() or SpoutPlayer.getMainScreen().closePopup(). They end up having to use the Escape key on their keyboard to get out of it.

After a bit of debugging, I've found that the problem occurs only if GenericPopup.setDirty(true) is called after the screen is attached and visible to the client. I use that method after updating the menu buttons as needed when the player moves between pages. If I comment that line of code out, the problem doesn't occur; of course, with that line commented out the buttons don't properly get updated on the client end, so that's no good. I've even tried using setDirty(true) on each of the individual buttons instead of on the GenericPopup, but that effectively did nothing.

Just venturing a guess, but it seems most likely to be a Spoutcraft bug.