Jump to content
Sign in to follow this  
Guest Patrick_Waugh

Dynamic Tooltips - What am I doing wrong here?

Recommended Posts

Guest Patrick_Waugh

Here's the relevant code:static FLOAT64 FSAPI getSwitchPos(FLOAT64, ID, PCSTRINGZ, MODULE_VAR *, PGAUGEHDR){ return genSwitchPosition;}MOUSE_TOOLTIP_ARGS(switchArgs) MOUSE_TOOLTIP_ARG(MODULE_VAR_NONE, 0, NULL, NULL, NULL, getSwitchPos, NULL, NULL)MOUSE_TOOLTIP_ARGS_ENDMOUSE_BEGIN(generatorSwitch_rect, HELP_NONE, 0, 0) // Toward RESET MOUSE_PARENT_BEGIN(0, 0, 75, 65, HELP_NONE) MOUSE_TOOLTIP_TEXT_STRING("genSwitchPosition: %1!d!", switchArgs) MOUSE_CHILD_FUNCT(0, 0, 75, 65, CURSOR_UPARROW, MOUSE_LEFTSINGLE, clickUp_mcb) MOUSE_PARENT_END // Toward ON MOUSE_PARENT_BEGIN(0, 85, 75, 65, HELP_NONE) MOUSE_TOOLTIP_TEXT_STRING("genSwitchPosition: %1!d!", switchArgs) MOUSE_CHILD_FUNCT(0, 0, 75, 65, CURSOR_DOWNARROW, MOUSE_LEFTSINGLE, clickDown_mcb) MOUSE_PARENT_ENDMOUSE_ENDThanks,Patrick

Share this post


Link to post
Share on other sites

Your callback function is returning a FLOAT64, but your tooltip string is formatted to expect an integer.Doug

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Yes, I caught that shortly after posting this, and changed it, but still didn't work.I'll have to re-read the SDK and look at it again when I'm more awake.Patrick

Share this post


Link to post
Share on other sites

This code is tested & working:FLOAT64 FSAPI mouse_ipc (FLOAT64,ID,PCSTRINGZ,MODULE_VAR *MODULE_VAR_NONE,PGAUGEHDR){ return IPC_Active;}MOUSE_TOOLTIP_ARGS (E4) MOUSE_TOOLTIP_ARG (MODULE_VAR_NONE, 0, NULL, NULL, NULL, mouse_ipc, NULL, NULL)MOUSE_TOOLTIP_ARGS_ENDMOUSE_BEGIN(ipc_test_mouse_rect,0,0,0) MOUSE_TOOLTIP_TEXT_STRING ("IPC Control Status: %1!1.0f!", E4) MOUSE_CHILD_FUNCT(1,1,55,74,CURSOR_HAND,MOUSE_LEFTSINGLE,dump_mouse_cb0)MOUSE_ENDThe only difference I can see is that your function is declared as a static.Doug

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Thanks Doug, I'll give this a try later today. I took a much needed day off yesterday, and now I have my brain back.Patrick

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

You guys will get a laugh out of this.I figured out why I couldn't get dynamic tool tips to work. :-beerchugI turned them on in Options. :-xxrotflmao

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...