/** * Shows a modal window, freezing the game until the window is closed. * This is large the show modal and has left alignment. It's better for longer messages, such as errors. */ static public ModalNotificaionState ShowLargeModal(string title, string message) { var state = new ModalNotificaionState(title, message, TextAnchor.MiddleLeft, 600); PushState(state); return(state); }
/** Informs the player that game files are missing. */ private ModalState CreateMissingGameFilesNotice() { var notice = new ModalNotificaionState( "Game Files Missing", "The game files required to run are not present." + "\n" ); return(notice); }
/** Resets the game and pops a window up stopping the application from continuing */ private void performGameReset() { CoM.FullReset(); var modalState = new ModalNotificaionState("Game Reset", "The game has been reset and must be restarted."); modalState.ConfirmationButton.Visible = false; Engine.PushState(modalState); CoM.SaveOnExit = false; }
/** Informs the player that a general error has occured. */ private ModalState CreateErrorNotice() { var notice = new ModalNotificaionState( "An Error Has Occured", errorMessage, TextAnchor.UpperLeft, 600 //Screen.width - 100 ); return(notice); }