} // end of TitleScreenMode Init() public void DoneLoadingContent() { if (progress != null) { progress.Complete(); progress = null; } updateObj.done = true; if (Program2.bShowVersionWarning) { Program2.bShowVersionWarning = false; GamePadInput.CreateNewerVersionDialog(); } if (BokuGame.Logon) { logonDialog.Activate(); } // Did we save the previous user? If so, restore. if (XmlOptionsData.KeepSignedInOnExit) { Auth.SetCreator(XmlOptionsData.CreatorName, XmlOptionsData.CreatorIdHash); } else { // Else, show the SignIn dialog. AuthUI.ShowSignInDialog(); } } // end of DoneLoadingContent()
public void Render() { int opCount = ProgressScreen.Operations.Count; // It may be valid for this list to briefly be empty before the ProgressScreen deactivates. if (opCount == 0) { return; } ProgressOperation op = ProgressScreen.Operations[opCount - 1]; if (op.LongRunning || op.AlwaysShow) { string message = op.Message; if (message != null) { UI2D.Shared.GetFont Font = UI2D.Shared.GetGameFont24; SpriteBatch batch = UI2D.Shared.SpriteBatch; int textWidth = (int)Font().MeasureString(message).X; int screenWidth = BokuGame.bokuGame.GraphicsDevice.Viewport.Width; int textX = (screenWidth - textWidth) / 2; int textY = BokuGame.bokuGame.GraphicsDevice.Viewport.TitleSafeArea.Top; batch.Begin(); TextHelper.DrawString(Font, message, new Vector2(textX, textY), Color.White); batch.End(); } } }
} // end of TitleScreenMode Refresh() override public void Activate() { if (!state) { if (progress == null) { progress = ProgressScreen.RegisterOperation(); progress.AlwaysShow = true; } pendingState = true; } } // end of TitleScreenMode Activate()
public static void UnregisterOperation(ProgressOperation op) { if (instance != null) { if (instance.operations.Contains(op)) { instance.operations.Remove(op); } if (instance.operations.Count == 0) { CommandStack.Pop(instance.commandMap); } } }
public static ProgressOperation RegisterOperation() { ProgressOperation op = new ProgressOperation(); if (instance != null) { if (instance.operations.Count == 0) { CommandStack.Push(instance.commandMap); } instance.operations.Add(op); } return(op); }