Jump to content
Sign in to follow this  
badderjet

String Parameters - C

Recommended Posts

From gauges.h:#define MAKE_STRING( NAME, NEXT_LIST, FAILURE, DRAW_FLAGS, ASI_FLAGS, POSITION_X, POSITION_Y, SIZE_X, SIZE_Y, NUM_CHARS, SOURCE_VAR_1, SOURCE_VAR_2, SOURCE_VAR_3, FORECOLOR, BACKCOLOR, HILITECOLOR, FONT_NAME, FONT_WEIGHT, FONT_CHARSET, FONT_SIZE, DRAW_TEXT_FLAGS, HILITE_LIST, CALLBACK)Now can anyone explain to me why there are three SOURCE_VARs and what they're for. I mean I's understand if there'd be one, but why three and how to use them?? :-hmmmThanx in advance :-)http://flightsimmers.net/airport/etti/signature_pro.jpg

Share this post


Link to post
Share on other sites
Guest

If you read the SDK documentation you will find out why there are 3.SOURCE_VAR_1 Contains the token variable used to update the string. The string can contain numbers, characters, or both. If you want to set your variable values, enter MODULE_VAR_NONE.SOURCE_VAR_2 Used to look up multiple token variables to update the string. (e.g., Hours, Minutes, Seconds). Sequence them inside the callback function. SOURCE_VAR_3 Pretty much the same as SOURCE_VAR_2Using the example from in the SDK docs,MAKE_STRING( temperature_string, NULL, temperature_fail, IMAGE_USE_ERASE | IMAGE_USE_BRIGHT, 0, 28, 9, 60, 29, 3, TOTAL_AIR_TEMP, <<<< 1 DISPLAY_UNITS, <<<< 2 MODULE_VAR_NONE, <<<< 3 RGB(255,0,0), RGB(0,0,0), RGB(92,92,92), GAUGE_FONT_DEFAULT, GAUGE_WEIGHT_DEFAULT, GAUGE_CHARSET, 0, DT_CENTER | DT_VCENTER | DT_SINGLELINE, NULL, temperature_string_cb)String will be source var 1 + source var 2 (3 is set to non so isn`t used)If the TAT is 60 degrees and the DISPLAY_UNITS are degrees C the string will be "60C"You would use all 3 in a clock for example, SV1 = Hours SV2 = Mins SV3 = SecsChrishttp://thegreatptmd.tripod.com

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...