Example #1
0
        public static void AddHtmlTextRectangle(this Gump gump, int x, int y, FontHandling.FontSize size, bool bold, bool italicized, bool underlined, string webColor, string text, int width, int height)
        {
            string displayMarkup = text;


            if (bold)
            {
                displayMarkup = string.Format("<B>{0}</B>", displayMarkup);
            }

            if (italicized)
            {
                displayMarkup = string.Format("<I>{0}</I>", displayMarkup);
            }

            if (underlined)
            {
                displayMarkup = string.Format("<U>{0}</U>", displayMarkup);
            }

            displayMarkup = string.Format("<BASEFONT COLOR={0} SIZE={1} >{2}</BASEFONT>", webColor, (int)size, displayMarkup);


            gump.AddHtml(x, y, width, height, displayMarkup, false, false);
        }
Example #2
0
 public static void AddHtmlLabel(
     this Gump gump,
     int x,
     int y,
     FontHandling.FontSize size,
     bool bold,
     bool italicized,
     bool underlined,
     string webColor,
     string text)
 {
     gump.AddHtmlTextRectangle(
         x,
         y,
         size,
         bold,
         italicized,
         underlined,
         webColor,
         text,
         FontHandling.CalculateTextLengthInPixels(text, size, italicized, bold),
         FontHandling.FONT_LINE_HEIGHT);
 }
Example #3
0
 public WebColoredHyperLink(Point2D location, string htmlColor, bool underlined, bool italicized, bool bold, GumpResponse callback, int callbackParam, string text, FontHandling.FontSize size = FontHandling.FontSize.Medium)
     : base(location, 0, underlined, italicized, bold, callback, callbackParam, text, size)
 {
     HtmlColor = htmlColor;
 }
Example #4
0
 public static void AddHtmlLabel(this Gump gump, int x, int y, FontHandling.FontSize size, bool bold, bool italicized, bool underlined, string webColor, string text)
 {
     gump.AddHtmlTextRectangle(x, y, size, bold, italicized, underlined, webColor, text, FontHandling.CalculateTextLengthInPixels(text, size, italicized, bold), FontHandling.FONT_LINE_HEIGHT);
 }
Example #5
0
 public HyperLink(Point2D location, int hue, bool underlined, bool italicized, bool bold, GumpResponse callback, int callbackParam, string text, FontHandling.FontSize size = FontHandling.FontSize.Medium)
 {
     Location = location;
     Hue = hue;
     Underlined = underlined;
     Italicized = italicized;
     Bold = bold;
     Callback = callback;
     CallbackParam = callbackParam;
     Size = size;
     DisplayText = text;
 }