示例#1
0
文件: Engine.cs 项目: bsimser/CoM
    /**
     * 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);
    }
示例#2
0
        /** 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);
        }
示例#3
0
        /** 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;
        }
示例#4
0
        /** 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);
        }