Sign in to follow this  
Guest bartels

gau c programming issue push code?

Recommended Posts

After working on some other areas of gau coding, I thought it would be cool to get bills (very much appreciated push code .) working. Code:BOOL FSAPI some_icon_cb( PPIXPOINT relative_point, FLAGS32 mouse_flags) { if ( mouse_flags == MOUSE_LEFTSINGLE ) { some_icon= 1 ; } else { some_icon= 0 ; } return FALSE; } MOUSE_BEGIN(gauge_mouse_rect,0,0,0) MOUSE_CHILD_FUNCT(160,33,41,78,CURSOR_HAND,MOUSE_LEFTSINGLE,some_icon_cb ) MOUSE_END This to my knowledge makes it disappear when clicked. I set it up so the make icon code links to this 8 lines down, 2 lines over, And in my callback I imputed a hide and show code Code: case PANEL_SERVICE_PRE_UPDATE: if (some_icon == 0) { HIDE_LISTELEMENT( pelement , pos_element ) add_imagedata_to_listelement( pelement , pos_element , IMAGE_HIDDEN ) } else if (some_icon == 1) { SHOW_LISTELEMENT( pelement , pos_element ) remove_imagedata_from_listelement( pelement , pos_element , IMAGE_HIDDEN ) } break; When i try exporting it, the compiler gives me lots of errors and fails ? any ideas?

Share this post


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

Wrong pelement/pos_element in the gauges callback? Try pgauges->elements_list[0] instead pelement. It could be even possible to do that directly from the mouse callback, since the pgauge pointer can be retrieved from the mouse args by a certain mouse macro (PGAUGE_FROM_MOUSE_ARGS or so).

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