Ejemplo n.º 1
0
        public virtual void CheckForMouseOverTextAt(float topY)
        {
            float num = (float)UI.screenWidth - 38f - 12f;

            if (!Mouse.IsOver(new Rect(num, topY, 38f, 30f)))
            {
                return;
            }
            Find.LetterStack.Notify_LetterMouseover(this);
            TaggedString mouseoverText = GetMouseoverText();

            if (!mouseoverText.RawText.NullOrEmpty())
            {
                Text.Font   = GameFont.Small;
                Text.Anchor = TextAnchor.UpperLeft;
                float num2 = Text.CalcHeight(mouseoverText, 310f);
                num2 += 20f;
                float x        = num - 330f - 10f;
                Rect  infoRect = new Rect(x, topY - num2 / 2f, 330f, num2);
                Find.WindowStack.ImmediateWindow(2768333, infoRect, WindowLayer.Super, delegate
                {
                    Text.Font     = GameFont.Small;
                    Rect position = infoRect.AtZero().ContractedBy(10f);
                    GUI.BeginGroup(position);
                    Widgets.Label(new Rect(0f, 0f, position.width, position.height), mouseoverText.Resolve());
                    GUI.EndGroup();
                });
            }
        }
Ejemplo n.º 2
0
 protected override string GetMouseoverText()
 {
     return(text.Resolve());
 }
Ejemplo n.º 3
0
 public Rect Label(TaggedString label, float maxHeight = -1f, string tooltip = null)
 {
     return(Label(label.Resolve(), maxHeight, tooltip));
 }
Ejemplo n.º 4
0
 public static void AppendLineTagged(this StringBuilder sb, TaggedString taggedString)
 {
     sb.AppendLine(taggedString.Resolve());
 }