Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Departure Label background_color goes over nosid_color #57

Closed
erikwachters opened this issue Dec 20, 2019 · 10 comments
Closed

Departure Label background_color goes over nosid_color #57

erikwachters opened this issue Dec 20, 2019 · 10 comments
Assignees
Labels

Comments

@erikwachters
Copy link

Hi,

I've tested the nightly build and all works fine.
The only thing is that if an A/C has no SID still has the "background_color" color and not the "nosid_color". Maybe the "nofpl_color" has the same problem?

Another idea for implementation is that you can choose that the font size of the first line is bigger than the 2nd & 3th & ..... line so that the C/S is bigger than the info in the other lines.

Regards,

E.

@Keanu73
Copy link
Contributor

Keanu73 commented Dec 20, 2019

It will only use "background_color" if it can't find "nosid_color"/"nofpl_color". As for the font size, I will look into it.

@erikwachters
Copy link
Author

erikwachters commented Dec 28, 2019

Hi,
I tested it in a sweatbox session and I have the "background_color" on an aircarft without SID instead of the "nosid_color".
Screenshot: http://prntscr.com/qgrb3g

My config:
"departure": {
"definition": [
["callsign", "wake"],
["seprwy", "sqerror"]
],
"nofpl_color": {
"r": 0,
"g": 100,
"b": 170,
"a": 255
},
"nosid_color": {
"r": 230,
"g": 0,
"b": 230,
"a": 255
},
"background_color": {
"r": 0,
"g": 200,
"b": 190,
"a": 255
},
"background_color_on_runway": {
"r": 40,
"g": 255,
"b": 240,
"a": 255
},
"text_color": {
"r": 0,
"g": 0,
"b": 0
}
},

Normally the label must be pink.

E.

@Keanu73
Copy link
Contributor

Keanu73 commented Dec 28, 2019

Hrm hrm hrm.. so this isn't just a quirk. I'll look into it.

@pierr3
Copy link
Owner

pierr3 commented Apr 24, 2020

@Keanu73 anything you were able to find related to this?

@Keanu73
Copy link
Contributor

Keanu73 commented Apr 24, 2020

Not yet, so far..

@pierr3
Copy link
Owner

pierr3 commented Jul 18, 2020

@erikwachters on your screenshot, was that aircraft VFR? VFRs are excluded from the Nosid/sid colour logic, let me know if you think that should change.

Re/text bigger on L1, I'd like to implement but in the current architecture it's going to be a bit complex

@hpeter2
Copy link
Contributor

hpeter2 commented Sep 4, 2020

Explanation:
Method CSMRRadar::OnRefresh, region tags does the following check:
if (fp.GetFlightPlanData().GetPlanType() == "I" && TagReplacingMap["asid"].empty() && LabelsSettings[Utils::getEnumString(ColorTagType).c_str()].HasMember("nosid_color")) {...}

The first part of that mentioned check unfortunately never succeeds, even if the Flightplan-Type is IFR ('I'). (See attached screenshot)
This can be fixed by changing this check to a character comparison:
fp.GetFlightPlanData().GetPlanType()[0] == 'I'

The same has to be applied to method CInsetWindow::render of the Inset-Window.

bug_57


"nofpl_color" will never be used, as the check is only applied on Departure tag types. Aircraft without a flightplan can't be defined as departing ones. The check
if (TagReplacingMap["actype"] == "NoFPL" && LabelsSettings[Utils::getEnumString(ColorTagType).c_str()].HasMember("nofpl_color")) {...}
should be outside and below the ColorTagType == TagTypes::Departure bracket (again, Radar & Inset)

@hpeter2
Copy link
Contributor

hpeter2 commented Sep 4, 2020

I forgot, the "nofpl_color" configuration has to be below Tag-Type "uncorrelated"

hpeter2 added a commit to hpeter2/vSMR that referenced this issue Sep 4, 2020
Please adjust your profile. Move nofpl_color below "labels"->"uncorrelated"
@pierr3
Copy link
Owner

pierr3 commented Sep 7, 2020

Thanks @hpeter2 ! I am having a look, so far your code looks great! Could you open pull request for this if you so wish?

hpeter2 added a commit to hpeter2/vSMR that referenced this issue Sep 8, 2020
hpeter2 added a commit to hpeter2/vSMR that referenced this issue Sep 8, 2020
pierr3 added a commit that referenced this issue Sep 14, 2020
Departure Label background_color goes over nosid_color #57
@pierr3
Copy link
Owner

pierr3 commented Sep 14, 2020

Should be fixed in nightly thanks to @hpeter2 !

@pierr3 pierr3 closed this as completed Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants