RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

GumpEntries

A_Li_N

Knight
GumpEntries

Took a stab in the dark today to try to create something and it actually worked. I will be trying different things along these lines and will be posting them here as I get them finished. Devs, please take from them if you wish to put them in the distro.

Until they go into the distro, I've included a 'GumpEntries.cs' that has calls to add the entries to a gump. I'll give an example call from a gump script with each one. When I have more time, I'm going to look into getting textual Tooltips using 1060658, by looking at how ObjectPropertyList does it.

  1. GumpButtonWTooltip.cs - Put tooltips on individual buttons.
    Code:
    GumpEntries.AddButtonWTooltip( this, 10, 10, 247, 248, 1, GumpButtonType.Reply, 0, 1012006 );
  2. GumpBackgroundWTooltip.cs - Put tooltips on individual backgrounds.
    Code:
    GumpEntries.AddBackgroundWTooltip( this, 0, 0, 100, 100, 9200, 1012006 );
  3. GumpAlphaRegionWTooltip.cs - Put tooltips on individual alpha regions.
    Code:
    GumpEntries.AddAlphaRegionWTooltip( this, 10, 10, 100, 100, 1012006 );
  4. GumpCheckWTooltip.cs - Put tooltips on individual check boxes.
    Code:
    GumpEntries.AddCheckWTooltip( this, 10, 10, 247, 248, false, 1, 1012006 );
 

Attachments

  • GumpEntries.rar
    2.5 KB · Views: 46

A_Li_N

Knight
Added GumpBackgroundWTooltip.cs

Same concept, allows you to put a tooltip on an individual background.

Caveats:
It seems that Tooltips act the same way as buttons do in the sense that they are an 'area' on the gump, and the first one added will be the one displayed. I'll explain using buttons...

3 buttons; 1, 2, 3
Stack them on top of each other, in that order, and click, the only code that will run is the code for button 1.
3 tooltips; x, y, z
x is on a background, y is on a button that sits on that background, z is on a button that sits beside that background. Hover over z and you will see it. Hover over y and you will see x, since x was added first.

So the tooltip on a background could be good for grouping similar items together with the same tooltip...same buttons, labels, etc that all have to do with location a can be placed on a BackgroundWTooltip with a tooltip 'a'.
 

Ashlar

Sorceror
Thanks for figuring this out A_Li_N!
I was looking at tooltips earlier and didnt get too far with it.

Quick question: Are you planning to update your Gump Tutorial?
I found it really useful. Then again, i guess that is what this is.. *Doh!*
 

A_Li_N

Knight
Ashlar said:
Thanks for figuring this out A_Li_N!
I was looking at tooltips earlier and didnt get too far with it.

Quick question: Are you planning to update your Gump Tutorial?
I found it really useful. Then again, i guess that is what this is.. *Doh!*
Someday, I will, yes. This isn't really a tutorial. This is more adding some features and explaining how to use them :D More coming in a minute...pretty much the base controls, all with tooltips.
 

A_Li_N

Knight
Added GumpAlphaRegionWTooltip & GumpCheckWTooltip

Added GumpAlphaRegionWTooltip & GumpCheckWTooltip
Yeah, same concept :)
 
Top