HomeWildfire Games

PushGuiPage support for passing a function instead of a function name.

Description

PushGuiPage support for passing a function instead of a function name.
Allows coding the GUI without global functions which break prototype-oriented coding, refs #5322, fixing the concern in rP14496.

Supports stacked message boxes and removes the according workaround.
Change structree / civinfo switch-dialog code from rP21339 to perform the callback for page that actually registered the callback.
Ensure the parent that the callbackhandler is always called if the page is closed.
Merge PopGuiPage and PopGuiPageCB following that choice, incidentally leaving cleaner code.

Differential Revision: https://code.wildfiregames.com/D1684
Comments by: Yves, Vladislav, wraitii, leper

Event Timeline

elexis added inline comments.Thu, Aug 29, 11:32 PM
/ps/trunk/binaries/data/mods/public/gui/session/menu.js
1229

This callback should, must have been updated too!

elexis added inline comments.Sun, Sep 22, 12:49 AM
/ps/trunk/binaries/data/mods/public/gui/locale_advanced/locale_advanced.js
59

This closed without callback, the one below called with callback.
Now its always called with callback, so the callback must ignore the undefined return value instead of complaining about that.