Allow Pop-ups to be attached to text labels

Let us know what features not currently in the PT4 should be added.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Allow Pop-ups to be attached to text labels

Postby oracle3001 » Wed May 23, 2012 4:29 pm

Would it be possible to make text labels "clickable" to enable one to attach pop-up menus, in the same way normal stats are?

I have a number of context pop-up menus, and want I am looking to do is have a row of text labels in an always visible panel, which I can then click a particular label to reveal a certain menu.

Yes I could have a label and a stat and attach the pop-up menu to the stat, but I am trying to compress the number / size of always visible element. Thus I would be able to attach the various pop-ups in half the space if I only need a label, rather than a label and a stat.
oracle3001
 
Posts: 851
Joined: Fri Jan 25, 2008 4:12 am

Re: Allow Pop-ups to be attached to text labels

Postby kraada » Wed May 23, 2012 4:49 pm

That's an interesting suggestion - I'll make a note of it for possible future consideration.

In the meantime here's a workaround that may work for you - create a custom stat that shows just text (using format()) - then since it's a stat you'll be able to attach a popup to it. Since there's no database call, it should be instant even though it's custom.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Allow Pop-ups to be attached to text labels

Postby oracle3001 » Wed May 23, 2012 4:58 pm

When I create the custom stat, I insert format() into Value Expression box and it validates ok. However, when I add this stat to the HUD is displays "XYZ"? Am I forgetting to do something?

Edit:- Although the preview window of the HUD panel shows XYZ, it doesn't actually show up on the actual HUD.
oracle3001
 
Posts: 851
Joined: Fri Jan 25, 2008 4:12 am

Re: Allow Pop-ups to be attached to text labels

Postby kraada » Wed May 23, 2012 5:57 pm

You want to put the text in format(). Like:

format('XYZ')
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Allow Pop-ups to be attached to text labels

Postby oracle3001 » Wed May 23, 2012 6:06 pm

Sorry I wasn't been clear. That is what I have been doing, but no matter what I put in the string, where we have format(' string ') the HUD preview always contains string followed by XYZ e.f format('BvB') -> 'BvBXYZ' in the preview window. The actual HUD will just show BvB as required.
oracle3001
 
Posts: 851
Joined: Fri Jan 25, 2008 4:12 am

Re: Allow Pop-ups to be attached to text labels

Postby WhiteRider » Thu May 24, 2012 4:05 am

That's correct - the preview doesn't display the value of stats, it displays a placeholder. Any stat which displays text will be shown as XYZ as the preview doesn't know the value of the stat. In this case it is a fixed string, but the preview doesn't know that.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to PT4 Feature Requests

Who is online

Users browsing this forum: No registered users and 13 guests