Archived

This topic is now archived and is closed to further replies.

hyperion

FSX SP2 AC: Problem with tootips

Recommended Posts

Hi,I want to modify the tooltips for the cylinder head temperature gauge of the default grumman goose in FSX with my own tooltips. The default tooltips are

            	<Tooltip id="Tooltip">                	<DefaultId>TOOLTIPTEXT_ENG1_CHT_CELSIUS</DefaultId>                	<EnglishId>TOOLTIPTEXT_ENG1_CHT_FARENHEIT</EnglishId>	            	</Tooltip>

When I change this with my code, the gauge will not be loaded, at least it is not visible on the panel. I did this change according to a post I found in the forum.

           	<Tooltip id="Tooltip">                	<code>"Engine 1 Cylinder Head Temperature (%((L:SE chtAV celsius Eng1, celsius))%!d! °C)"</code>            	</Tooltip>

Please, can anyone help me and tell me what is wrong with my code?Kind regardsErich

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Are you using the FSX or FS9 style XML script? lol, I can't tell anymore.I can just make this comment...For a custom tooltip you use...

<TooltipText> </TooltipText>

instead of...

<TooltipID></TooltipID>

TooltipText allows you to create a custom tooltip from an expression.TooltipID allows you to select a conventional tooltip from a list of readymade tooltips.I'm not sure how this works in FSX style script...so hopefully someone else can answer.So, I'd try this instead...

<TooltipText>Engine 1 Cylinder Head Temperature (%((L:SE chtAV celsius Eng1, celsius))%!d! °C)</TooltipText>

Share this post


Link to post
Share on other sites

Thank you. I tried your suggestion but had no luck, same as before the gauge will not be loaded. Has someone else an idea?Erich

Share this post


Link to post
Share on other sites

Hi,Fs9, probably not working in fsx: <Area Left="1200" Right="1280" Top="500" Bottom="835"><Tooltip>Display/Hide Pedestal</Tooltip><Cursor Type="Hand"/><Click>(>K:VIEW_REAR)</Click></Area>Jan

Share this post


Link to post
Share on other sites

Hi Jan,what I tried now is this

<Tooltip id="Tooltip">      	<DefaultScript>Engine 1 Cylinder Head Temperature</DefaultScript> </Tooltip>

This works, the gauge is loaded and I can see the tooltip text.But when I do

<Tooltip id="Tooltip">       	<DefaultScript>Engine 1 Cylinder Head Temperature (%((L:SE chtAV celsius Eng1, celsius))%!d! °C)</DefaultScript></Tooltip>

the gauge will not be loaded. I have no idea what is wrong. Unfortunately I do not know what the difference between FS9 or FSX syntax is. I don't understand the FSX SDK , no examples or help. So I look in gauges from other people how they did it.Erich

Share this post


Link to post
Share on other sites

No experience with fsx, but try (works in fs9):<DefaultScript>Engine 1 Cylinder Head Temperature %((L:SE chtAV celsius Eng1, celsius))%!d! °C</DefaultScript>Jan

Share this post


Link to post
Share on other sites

This one now works:

 <Tooltip id="Tooltip">    	<DefaultScript>Engine 1 Cyl. Head Temp. (%((L:SE chtAV celsius Eng1, celsius))%!d! C)</DefaultScript></Tooltip>

The reason why the previous version doesn't work is the degree sign '°' before the "C". I found out by trial and error. The degree sign breaks the code. I wonder if there is an escape sequence which allows to put in a degree sign. I have searched the SDK but found nothing about. Very strange this tooltip mumbo jumbo.Erich

Share this post


Link to post
Share on other sites

Hi,There is and that was what i tried to show you, but the forum won't.It is, behind each other (otherwise ° !!):°Hope it shows up,Jan

Share this post


Link to post
Share on other sites
The reason why the previous version doesn't work is the degree sign '°' before the "C". I found out by trial and error. The degree sign breaks the code. I wonder if there is an escape sequence which allows to put in a degree sign. I have searched the SDK but found nothing about. Very strange this tooltip mumbo jumbo.Erich
Unfortunately, you can't enter Alt-167 directly...Check out "Escape Codes" in the SDK that are used only for string formatting... :(
\{dplo=X} Put a degrees symbol above the next character after the ?=?
In this case we want the 'degrees symbol' to follow the letter "C" so we simply put a blank space after the = sign, which will result in: Cº
<DefaultScript>Engine 1 Cyl. Head Temp. (%((L:SE chtAV celsius Eng1, celsius))%!d! C\{dplo= })</DefaultScript>

...or, before the "C" for ºC

<DefaultScript>Engine 1 Cyl. Head Temp. (%((L:SE chtAV celsius Eng1, celsius))%!d!\{dplo= } C)</DefaultScript>

Share this post


Link to post
Share on other sites

Thank you for your suggestions, but it doesn't work, see the attached picture. The escape code is represented literally. Obviously can't it be used in this position.Erich

Share this post


Link to post
Share on other sites

You can certainly add Alt coded symbols in a Formatted Text section:You use the nomenclature _176; which is a degree symbol, for example (remove the underline when you add the code). Note the ending ; I don't know if you can use them in regular String sections or not.Hope this helps,

Share this post


Link to post
Share on other sites

Hi Tom,thanks, it helped a lot, with the alt coded symbol I got the degree sign, my complete tooltip is now

<Tooltip id="Tooltip">   	<DefaultScript>Engine 1 Cyl. Head Temp. (%((L:SE chtAV celsius Eng1, celsius))%!d! °C)</DefaultScript></Tooltip>

But with a blank between the # and 176 the gauge was not loaded, I had to put them together.Erich

Share this post


Link to post
Share on other sites
Thank you for your suggestions, but it doesn't work, see the attached picture. The escape code is represented literally. Obviously can't it be used in this position.Erich
"Obviously" it can be used, else I'd not have suggested it to begin with... :( Without seeing the script you actually used however, I can't begin to see what was done incorrectly. However, here are examples that do work, and come from one of my own gauges. Note that the first example is only a sub-section of a multi-line <String> expression:
%\{fnt1}\t\{clr}TRK \{fnt}\{clr2}%((A:GPS WP DESIRED TRACK,degrees) d360)%!03d!\{dplo= }\{fnt1} M%{end} // ºM<String>%((A:GPS GROUND MAGNETIC TRACK,degrees) d360)%!03d!\{dplo= } M</String> // 090ºM<String>%((A:GPS GROUND MAGNETIC TRACK, degrees) d360)%!03d!\{dplo=M}</String>  // 360Mº<String>\n%((@c:WaypointIntersectionNearestVorMagneticRadial, degrees) d360)%!03d!\{dplo=M}</String>  // 047Mº

Share this post


Link to post
Share on other sites

Hi,No, I didn't miss it - I just didn't realize your code was oriented vertically. :)

Share this post


Link to post
Share on other sites

Hi Jan,same to me like Tom, I didn't miss it but I didn't understand until now. I am an XML newbie and it was a bit late late at night. I learned a lot from all your replies and that was it worth anyway, so thank you again.Erich

Share this post


Link to post
Share on other sites