Jack

Member
I'm guessing this isn't possible, but wondering if anyone has seen it used anywhere (including OSI).

I noticed the menu bar which appears at the top of the client (and is built into the client), has an "OnHover" function where the button you're hovering on changes color. As this is built into the client it is most likely just something specifically hardcoded. Has anyone seen this used elsewhere that wouldn't have been hardcoded into the client? It'd be a lovely feature to have on gumps.
 
Unfortunately, even if it were supported by the client, the amount of packet clutter by sending onhover or onmouseover packets would probably kill your server, not to mention someone could just abuse it and move their mouse around the screen really fast and hammer your server. These effects when done in Client->Server scenarios are usually predefined on the client side, or sent as part of the packet to define the user interface (gump id for normal/mouseover/pressed as an example). But, UO only does normal and pressed ids on buttons. Something you might consider is seeing if AddHtml allows any kind of hover: markup that you could overlay on top of a button. I'm not sure if this is possible, but it would be where I would look, and probably the only option if its possible.
 
It's not possible, the closest thing to hover interactions in gumps are the addition of support for ObjectPropertyList displays, and the standard clicloc-based tooltips.

ObjectPropertyLists used in gumps will only display if the client already knows about the entity and its associated property list.

Although the method Gump.AddItemProperty is named as such, it does actually support Mobiles too, all you do is pass the entity's Serial.

Given that OPL's offer a way to write HTML formatted text, you could possibly use this to display your own custom text, but it would require spoofing the client with false entity update packets that contain the property lists you want to display - and doing that before sending your gump.

You may naturally add 2 strings to an OPL, but if you add one string that contains '\n' or '<br>' line breaks, you can give the illusion of adding multiple custom lines, however, if a single cliloc ID's arguments exceed a certain length, the client will crash.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back