public virtual void Progress(float timeStep) { bool clearMenu = false; ProgressOverlay(timeStep); if (titleComponent != null) { titleComponent.Progress(timeStep); } if (quitComponent != null) { quitComponent.Progress(timeStep); } if (!graphicsReady) { if (overlayDark) { BuildVisualRepresentation(); } } else { if (!graphicsCleared) { ProgressOptionComponents(timeStep); if (selectedChoiceEffect != ChoiceEffect.None) { clearMenu = true; if (selectedQuitComponent != null) { if (selectedQuitComponent.GetCurrentStatus() != ButtonAnimator.STATUS_ACTIVATED) { clearMenu = false; } } if (selectedOptionComponent != null) { if (selectedOptionComponent.GetCurrentStatus() != ButtonAnimator.STATUS_ACTIVATED) { clearMenu = false; } } if (clearMenu) { if (!clearBeforeEffect) { PerformChoiceEffect(); selectedChoiceEffect = ChoiceEffect.None; /*halmeida - in this case the menu will not clear its visual representation by itself. * It will be waiting for a call to ClearVisualRepresentation to start the process. We can * call this a manual closure.*/ } else { ClearVisualRepresentation(false); /*halmeida - in this case the menu will clear its visual representation before passing * on the choice that was made. Since the selection effect value is not yet lost, this * instruction will be called again at every Process() call, until the graphics are actually * cleared and the choice effect is performed.*/ } } } else if (overlayClear) { /*halmeida - this is needed for the manual closure process. The outside call to clear the visual * representation removes the options and starts the overlay fading into clear. To trully complete * the closure we gotta remove the overlay, and this is done by calling the clearing function with * the overlay already at a clear color.*/ ClearVisualRepresentation(false); } } else { requiringProgress = false; if ((selectedChoiceEffect != ChoiceEffect.None) && clearBeforeEffect) { PerformChoiceEffect(); selectedChoiceEffect = ChoiceEffect.None; } } } }