TwinFan / XPMP2

Multiplayer library for X-Plane 11/12 with instancing, TCAS override, and sound
https://twinfan.github.io/XPMP2/
Other
24 stars 16 forks source link

Expose maxLabelDist to some config function #13

Closed TwinFan closed 4 years ago

TwinFan commented 4 years ago

Current Situation / Problem See TwinFan/LiveTraffic#188 Distance up to which labels are drawn is hard coded to 5,000m at the moment. Some people like to see labels earlier. Also, labels are cut off at X-Plane's reported visibility.

Suggested Solution Provide a configuration option for maxLabelDist, either in the configuration callbacks or as a separate function, or as addition to the existing XPMPEnableAircraftLabels() call.

Benefits Allows plugins to offer the user to chose when to show labels.

Additional context TwinFan/LiveTraffic#188

TwinFan commented 4 years ago

Provided

/// Configure maximum label distance and if labels shall be cut off at reported visibility
/// @param _dist_nm Maximum label distance in nm, default is 3, minimum is 1
/// @param _bCutOffAtVisibility Shall labels not be drawn further away than XP's reported visibility?
void XPMPSetAircraftLabelDist (float _dist_nm, bool _bCutOffAtVisibility = true);