May 19, 200719 yr Having never tried this before, I'm not sure what I'm doing wrong with this macro.#define GAUGE_CHARSET DEFAULT_CHARSET#define GAUGE_FONT_DEFAULT "Courier New"#define GAUGE_WEIGHT_DEFAULT FW_NORMAL CHAR atcID[] = "N001ST";FLOAT64 FSAPI string_cb( PELEMENT_STRING pelement ){ sprintf( pelement->string, "%s", atcID ); return 0;}MAKE_STRING( bac_id_string, NULL, NULL, IMAGE_USE_ERASE | IMAGE_USE_BRIGHT, 0, 2, 1, 87, 24, 6, MODULE_VAR_NONE, MODULE_VAR_NONE, MODULE_VAR_NONE, RGB(112,144,144), RGB(0,0,0), RGB(92,92,92), GAUGE_FONT_DEFAULT, GAUGE_WEIGHT_DEFAULT, GAUGE_CHARSET, 18, DT_CENTER | DT_VCENTER | DT_SINGLELINE, NULL, string_cb)from my code. What am I doing wrong?Patrick
May 19, 200719 yr Ok, I figured out I had to change the 18 to 0 to allow FS to auto compute the size.I guess if you manually set that, then you have to set the width parameter to be the width of a character vs. width of the background, but I'm still not sure.Patrick
May 19, 200719 yr Moderator >Ok, I figured out I had to change the 18 to 0 to allow FS to>auto compute the size.>>I guess if you manually set that, then you have to set the>width parameter to be the width of a character vs. width of>the background, but I'm still not sure."Specifies the font size for the string. A value of zero (0) means scale so that NUMCHARS capital W's fit into SIZE_X. A non-zero FONT_SIZE means fixed height."I've always used a zero entry here so that the font will rescale automatically regardless of gauge drawing size, etc. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
May 20, 200719 yr Thanks Bill.I have a niffty little gauge now that displays my customer's licensed registered aircraft id, and when you mouse over it shows their software key. =)It's kind of cool because each aircraft I sell now will have a unique official aircraft registration number.Eventually, I'll be able to set this up to issue these automatically over the web too.Patrick
Create an account or sign in to comment