Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dynaamic ooltip

Featured Replies

Hello,I would appreciate some help to get my dynamic mouse tooltip give me the frequency with the decimals for my radio COM1.Actually, I have a static variable and a callback calculating and returning the right frequency value.Arg_Get_Frequency, returns it. So I have declared the arguments array as followsstatic MOUSE_TOOLTIP_ARGS(com_freq_arg) MOUSE_TOOLTIP_ARG(MODULE_VAR_NONE, 0, NULL, NULL, NULL, Arg_Get_Frequency, NULL, NULL) MOUSE_TOOLTIP_ARGS_ENDand made the mouse tooltip like hereafter :static MOUSE_BEGIN( mouse_rect, HELP_NONE, 0, 0 ) MOUSE_TOOLTIP_TEXT_STRING("Communications Radio COM1 - %1!d.! MHz",com_freq_arg) ...... MOUSE_ENDIn that case I get the integer value of the frequency in the help.How can I get the frequency with the decimals ?I tried :MOUSE_TOOLTIP_TEXT_STRING("Communications Radio COM1 - %!07.3f! MHz",com_freq_arg)but it does not work;Any help would be greatly appreciatedThanksJean-Pierre

  • Author
  • Moderator

How have you declared com_freq_arg? Is it an int or float? If it is an integer (int) type, then try casting the variable with (float):MOUSE_TOOLTIP_TEXT_STRING("Communications Radio COM1 - %!07.3f! MHz",(float)com_freq_arg)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Change this:MOUSE_TOOLTIP_TEXT_STRING("Communications Radio COM1 - %!07.3f! MHz",com_freq_arg)to this:MOUSE_TOOLTIP_TEXT_STRING("Communications Radio COM1 - %1!07.3f! MHz",com_freq_arg)You lost the '1' after the '%' symbol.Doug

Hello,Thanks to all of you, the right answer wasMOUSE_TOOLTIP_TEXT_STRING("Communications Radio COM1 - %1!07.3f! MHz",com_freq_arg)Adding a 1 fefore the format telles which arguments array entry is selected. Without it, the entry would be 0. I had forgotten that.Here is the result on my "new" old type radioThanks once moreJean-Pierre

  • Author
  • Moderator

Hmmm... I'm happy that Doug had the right answer, 'cause I was sure way off base... ;)The gauge looks nice, although I had to 'save it' to a temp file and rename it to xxx.jpg in order to see it...

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.