DrFreas / VCH

Virtual Controller Helper
GNU General Public License v3.0
19 stars 4 forks source link

Color on TAG and lists #8

Closed Juanamado99 closed 3 years ago

Juanamado99 commented 3 years ago

Hi,

In VATSPA we use the Active Hold object in the departure list and in the TAG for ground asr's. The color of it can't be changed. Nor the rest but I know they are programmed to change according to the time.

I don't know if it's possible to assign a user/fix color, or the departure/arrival color from Euroscope's symbology settings. to the "VCH / Active Hold Short". Although we have "based on departure/arrival color" in the config, it only shows a kind of yellow on it.

Thank you for the plugin and great work on it :)

DrFreas commented 3 years ago

Hi, thank you for the feedback! Indeed the color for the request times changes according to the time that has passed. The hold short item doesn't change color. So far "user set colors" are not build in, though it is something I have already considered doing and are planning to do. Since the colors are set in the plugin itself, changing the config won't change anything. I'll try to figure out a way which allows to customize the colors according to settings (similar to the options introduced in the latest build). Since you are using this feature: would you see an enhancement if all those colors could be set with RGB values (e.g.: .vch set hscolor 255120244)? I don't know how complicated this would be to implement and don't quite know if it would be worth the effort building it in. Or give me a general idea how you would like to see this feature.

Juanamado99 commented 3 years ago

So that would be a nice solution for that. Of course if it takes a lot of effort, don't get troubled with that. I guess this solution could help. For example to set green would be like ".vch set hscolor 000255000"? The problem I see is when this is not recorded for future sessions. A solution I would implement would be creating a settings.txt and inside write "HSCOLOR:000255000" or a settings.json file with:

HS {
  color: "000255000";
}

Or:

HS {
  red: "000";
  green: "255";
  blue: "000";
}

Furthemore, I think the plugins.txt from Euroscope's "settings files setup" can be edited and variables might be declared there. But I've not idea on how to get that info to the .cpp file and setting it as the color constant on your .hpp file.

DrFreas commented 3 years ago

I would like to not have as less additional files as possible, so at this time all settings (well the few you get atm) get saved in the Euroscope place for settings, which I believe is in the plugins.txt right now. I thought about the color code to be stored in the hexadecimal way as well, this would require additional code to transcribe into something useful for the plugin API though. Might be a little bit easier to use though. But yes, saving the settings for this feature will definetly be a thing since I don't see any point for a possibility to change settings and a need to do that every time you start the plugin. For the "importability" of the color code into the plugin itself: that shouldn't be a problem at all hopefully, but I don't right now on top of my head if a colorref needs to be constant.

DrFreas commented 3 years ago

Function now included in v0.5.0, let me know what you think!

Juanamado99 commented 3 years ago

Works perfectly good, as I expected to work. The saving works fine, too. I had to move around the code searching the command that overwrites the color for the holding point which I guess was forgotten in the readme. I leave you here the command what should be included there. Or just like the other items, Holding point -> "hos". .vch color hos 255000000 Other than that, amazingly fast and a great job, Freas!

DrFreas commented 3 years ago

Indeed I forgot that in the readme! Luckily I put it in the release notes. Thank you for your feedback!