Exemple #1
0
 //UI method used for showing user data and advances throughout the game
 public void PrintUserData()
 {
     if (DataPlayer.Player == null)
     {
         PlayerGameReport.GetComponent <Text>().text = "you are in guest mod\n you dont have any data to show";
         return;
     }
     TextToDisplay.GetComponent <Text>().text = DataPlayer.Player.ToString();
 }
Exemple #2
0
        public ObjectViewerForm(TextToDisplay textToDisplay)
        {
            InitializeComponent();

            this.DisplayText(textToDisplay);
        }
Exemple #3
0
        private void DisplayText(TextToDisplay textToDisplay)
        {
            string mainText;
            string secondaryText;

            switch (textToDisplay)
            {
            case TextToDisplay.Nothing:
            default:
                this.ObjectTextBox.Text     = "[No text to display]";
                this.ObjectRichTextBox.Text = "[No text to display]";
                break;

            case TextToDisplay.Title:
                mainText      = "This is the title";
                secondaryText = "This is some body text";
                TextBoxDisplayHelper.ShowTitle(this.ObjectTextBox, mainText);
                TextBoxDisplayHelper.ShowIndentedText(this.ObjectTextBox, 0,
                                                      secondaryText, false, true);
                RichTextBoxDisplayHelper.ShowTitle(this.ObjectRichTextBox, mainText);
                RichTextBoxDisplayHelper.ShowIndentedText(this.ObjectRichTextBox, 0,
                                                          secondaryText, false, true);
                break;

            case TextToDisplay.SubTitle:
                mainText      = "This is the sub-title";
                secondaryText = "This is some body text";
                TextBoxDisplayHelper.ShowSubTitle(this.ObjectTextBox, mainText);
                TextBoxDisplayHelper.ShowIndentedText(this.ObjectTextBox, 0,
                                                      secondaryText, false, true);
                RichTextBoxDisplayHelper.ShowSubTitle(this.ObjectRichTextBox, mainText);
                RichTextBoxDisplayHelper.ShowIndentedText(this.ObjectRichTextBox, 0,
                                                          secondaryText, false, true);
                break;

            case TextToDisplay.NumberedText:
                mainText = "This is the numbered text";
                TextBoxDisplayHelper.ShowNumberedText(this.ObjectTextBox, 3, 2,
                                                      mainText, false);
                RichTextBoxDisplayHelper.ShowNumberedText(this.ObjectRichTextBox, 3, 2,
                                                          mainText, false);
                break;

            case TextToDisplay.IndentedText:
                mainText = "This is the indented text";
                TextBoxDisplayHelper.ShowIndentedText(this.ObjectTextBox, 2,
                                                      mainText, false, true);
                RichTextBoxDisplayHelper.ShowIndentedText(this.ObjectRichTextBox, 2,
                                                          mainText, false, true);
                break;

            case TextToDisplay.HeadedText:
                mainText = "Header: Normal text";
                TextBoxDisplayHelper.ShowHeadedText(this.ObjectTextBox, 2, mainText, false, true);
                RichTextBoxDisplayHelper.ShowHeadedText(this.ObjectRichTextBox, 2, mainText,
                                                        false, true);
                mainText = "Header (type: MyType): Normal text";
                TextBoxDisplayHelper.ShowHeadedText(this.ObjectTextBox, 2, mainText, false, true);
                RichTextBoxDisplayHelper.ShowHeadedText(this.ObjectRichTextBox, 2, mainText,
                                                        false, true);
                mainText = "All normal text";
                TextBoxDisplayHelper.ShowHeadedText(this.ObjectTextBox, 2, mainText, false, true);
                RichTextBoxDisplayHelper.ShowHeadedText(this.ObjectRichTextBox, 2, mainText,
                                                        false, true);
                break;
            }

            this.ObjectRichTextBox.ScrollToCaret();
            this.CloseButton.Focus();
        }