I’d like to implement full-screen popup windows in my game, using banners - the purpose is to have minigames in these popups, where the player doesn’t enter commands to the parser but uses keyboard shortcuts and/or links to play the game. The popup banner windows (using Eric Eve’s CustomBannerWindow extension) are created as transient, since they’re not supposed to be saved if a game is saved.
While the minigame is active, the player is not allowed to leave the current room (or to interact with anything outside the minigame), so I’d like to make sure that my banner is the only one visible on the screen (not, for example, the status bar on top that shows the current room, exits, etc.); I want to hide all banners before showing the minigame banner window.
When the minigame is over, I’d like to restore the view as it was before the minigame popped up - all banners that were previously on the screen, should be back to its original place and content.
I tried this:
local vector = new Vector ();
for (local o = firstObj(BannerWindow); o != nil;
o = nextObj(o, BannerWindow))
{
local bi = new BannerInfo ();
bi.handle = o.handle_;
bi.id = o.id_;
bi.parentId = o.parentID_;
bi.inited = o.inited_;
bi.style = o.styleFlags_;
vector.append (bannerInfo);
}
When I print out the vector contents, I get this:
Banner ID '', parent '', handle '1', init 'true', style '33'
Banner ID '', parent '', handle '', init 'true', style ''
Banner ID '', parent '', handle '', init 'true', style ''
Banner ID '', parent '', handle '', init 'true', style ''
The first banner is the status line, but I can’t identify the others, and I can’t tell if these are active objects or not (since firstObj()
returns unreachable objects, if any) .
I planned on calling showForRestore()
since hiding the banners (using removeBanner()
) would be a temporary, in-memory operation, but I don’t know what parameters to pass for the parent
, where
and other
parameters.
Is this possible to do? If not, what would be a better approach to this?