- ServUO Version
- Publish 57
- Ultima Expansion
- Endless Journey
So I have a "Stabled Pet List gump" (see screenshot below) that I used the AddMobileProperty(pet) method to make a tooltip appear when hovering over the pet image tile button. I've also tried the AddTooltip(...) method which works if I give it a cliloc, but not if I give it a string (even though supposedly that's a valid method). What I'd like to do is override the default tooltip (in whatever way works or works best) with a different one. You can see the default from AddMobileProperty(pet) in the screenshot below and then I've included a screenshot of my leashed "shrunken pet" gump that I would rather use instead.
Any and all help for the best way to implement this is greatly appreciated!


Any and all help for the best way to implement this is greatly appreciated!


Relevant part of gump code, extending from BaseGump:
public override void AddGumpLayout()
{
AddBackground(0, 0, 500, 550, 40000);
AddHtml(50, 12, 400, 18, Color("#FFFFFF","Stabled Pet List"), false, false);
AddHtml(50, 38, 102, 18, Color("#FFFFFF","Click to Claim"), false, false);
AddHtml(162, 38, 102, 18, Color("#FFFFFF","Name"), false, false);
AddHtml(274, 38, 61, 18, Color("#FFFFFF","Bonded"), false, false);
AddHtml(345, 38, 102, 18, Color("#FFFFFF","Type"), false, false);
if (Index < 0) Index = Pets.Count - 1;
if (Index >= Pets.Count) Index = 0;
int start = Index;
int index = 0;
for (int i = start; i < start + PerPage && i < Pets.Count; i++)
{
BaseCreature pet = Pets[i];
Rectangle2D bounds = ItemBounds.Table[ShrinkTable.Lookup(pet)];
int y = 65 + (index * 75);
AddImageTiledButton(50, y, 0x918, 0x919, 0x0, GumpButtonType.Page, 0, ShrinkTable.Lookup(pet), pet.Hue, 40 - bounds.Width / 2 - bounds.X, 30 - bounds.Height / 2 - bounds.Y);
AddMobileProperty(pet);
AddHtml(162, y, 102, 72, Color("#D5D5AC",pet.Name), false, false);
AddHtml(274, y, 102, 72, pet.IsBonded ? Color("#74C365","Yes") : Color("#E50914","No"), false, false);
AddHtml(345, y, 102, 72, Color("#D5D5AC",FriendlyNameAttribute.GetFriendlyNameFor(pet.GetType()).ToString()), false, false);
index++;
}
if (Index + PerPage < Pets.Count)
{
AddButton(430, 510, 30533, 30533, 2, GumpButtonType.Reply, 0);
AddHtmlLocalized(355, 510, 70, 20, 1114514, "#1044045", LabelColor, false, false); // NEXT PAGE
}
if (Index >= PerPage)
{
AddButton(50, 510, 30533, 30533, 3, GumpButtonType.Reply, 0);
AddHtmlLocalized(90, 510, 255, 20, 1044044, "#1044044", LabelColor, false, false); // PREV PAGE
}
}