ScreenType is being overloaded in incompatible ways:

- the editor sets "system_menu" to trick StepMania.cpp into not
   allowing the operator menu button, to prevent losing data;
 - the editor also sets "gameplay" in "playback" mode to influence
   ScreenSyncOverlay and ScreenDebugOverlay; this breaks the above,
   allowing scroll lock in play mode.

A similar problem happens when we push screens: scroll lock works
in the MiniMenus in the editor.

It's semantically unintuitive to call the editor a "system_menu", anyway.

Split out AllowOperatorMenuButton, and use it directly.  Check all
screens, and don't allow it if any screen on the stack disallows it.
This commit is contained in:
Glenn Maynard
2006-02-01 06:54:15 +00:00
parent d9c81c92cf
commit 7df95cd0d4
5 changed files with 15 additions and 2 deletions
+1 -1
View File
@@ -1223,7 +1223,7 @@ bool HandleGlobalInputs( const InputEventPlus &input )
/* Global operator key, to get quick access to the options menu. Don't
* do this if we're on a "system menu", which includes the editor
* (to prevent quitting without storing changes). */
if( SCREENMAN->GetTopScreen()->GetScreenType() != system_menu )
if( SCREENMAN->AllowOperatorMenuButton() )
{
SCREENMAN->SystemMessage( SERVICE_SWITCH_PRESSED );
GAMESTATE->Reset();