Example #1
0
 internal void AddPerson(Person person, Point p, string branchName)
 {
     if (Session.MainGame.mainGameScreen.TileInScreen(p))
     {
         Point  pointByPosition = Session.MainGame.mainGameScreen.GetPointByPosition(p);
         Bubble item            = new Bubble {
             SpeakingPerson = person,
             Position       = new Point(pointByPosition.X, pointByPosition.Y + (this.PositionCount(person) * this.BackgroundSize.Y))
         };
         GameObjectTextBranch branch = this.TextTree.GetBranch(branchName);
         if (branch != null)
         {
             item.LastingTime            = branch.Time;
             item.RichText               = new FreeRichText(); // this.TextBuilder);
             item.RichText.DefaultColor  = this.DefaultTextColor;
             item.RichText.ClientWidth   = this.TextClientWidth;
             item.RichText.ClientHeight  = this.TextClientHeight;
             item.RichText.RowMargin     = this.TextRowMargin;
             item.RichText.DisplayOffset = this.RichTextDisplayOffset(item.Position);
             item.RichText.SetGameObjectTextBranch(person, branch);
         }
         this.Bubbles.Add(item);
     }
 }
 internal void AddPerson(Person person, Point p, string branchName)
 {
     if (this.screen.TileInScreen(p))
     {
         Point pointByPosition = this.screen.GetPointByPosition(p);
         Bubble item = new Bubble {
             SpeakingPerson = person,
             Position = new Point(pointByPosition.X, pointByPosition.Y + (this.PositionCount(person) * this.BackgroundSize.Y))
         };
         GameObjectTextBranch branch = this.TextTree.GetBranch(branchName);
         if (branch != null)
         {
             item.LastingTime = branch.Time;
             item.RichText = new FreeRichText(this.TextBuilder);
             item.RichText.DefaultColor = this.DefaultTextColor;
             item.RichText.ClientWidth = this.TextClientWidth;
             item.RichText.ClientHeight = this.TextClientHeight;
             item.RichText.RowMargin = this.TextRowMargin;
             item.RichText.DisplayOffset = this.RichTextDisplayOffset(item.Position);
             item.RichText.SetGameObjectTextBranch(person, branch);
         }
         this.Bubbles.Add(item);
     }
 }
 internal void AddPersonText(Person person, Point p, string text)
 {
     if (this.screen.TileInScreen(p))
     {
         Point  pointByPosition = this.screen.GetPointByPosition(p);
         Bubble item            = new Bubble {
             SpeakingPerson = person,
             Position       = new Point(pointByPosition.X, pointByPosition.Y + (this.PositionCount(person) * this.BackgroundSize.Y))
         };
         if (text != null)
         {
             item.LastingTime            = this.PersonSpecialTextTimeLast;
             item.RichText               = new FreeRichText(this.TextBuilder);
             item.RichText.DefaultColor  = this.PersonSpecialTextColor;
             item.RichText.ClientWidth   = this.TextClientWidth;
             item.RichText.ClientHeight  = this.TextClientHeight;
             item.RichText.RowMargin     = this.TextRowMargin;
             item.RichText.DisplayOffset = this.RichTextDisplayOffset(item.Position);
             item.RichText.AddText(text);
             item.RichText.ResortTexts();
         }
         this.Bubbles.Add(item);
     }
 }
 internal void AddPersonText(Person person, Point p, string text)
 {
     if (this.screen.TileInScreen(p))
     {
         Point pointByPosition = this.screen.GetPointByPosition(p);
         Bubble item = new Bubble {
             SpeakingPerson = person,
             Position = new Point(pointByPosition.X, pointByPosition.Y + (this.PositionCount(person) * this.BackgroundSize.Y))
         };
         if (text != null)
         {
             item.LastingTime = this.PersonSpecialTextTimeLast;
             item.RichText = new FreeRichText(this.TextBuilder);
             item.RichText.DefaultColor = this.PersonSpecialTextColor;
             item.RichText.ClientWidth = this.TextClientWidth;
             item.RichText.ClientHeight = this.TextClientHeight;
             item.RichText.RowMargin = this.TextRowMargin;
             item.RichText.DisplayOffset = this.RichTextDisplayOffset(item.Position);
             item.RichText.AddText(text);
             item.RichText.ResortTexts();
         }
         this.Bubbles.Add(item);
     }
 }