treat colors like the other parameters: only copy them from the palette
color group /sim/hud/palette/color[*]/ to the active group /sim/hud/color/ if they really exist. (Parameters like <antialiased> can be set in the active group and be left alone, or set by each <palette> color group.)
This commit is contained in:
parent
b2b9a32e4b
commit
14addaab07
1 changed files with 6 additions and 3 deletions
|
@ -1114,8 +1114,11 @@ void HUD_Properties::valueChanged(SGPropertyNode *node)
|
|||
i = 0;
|
||||
SGPropertyNode *n = fgGetNode("/sim/hud/palette", true);
|
||||
if ((n = n->getChild("color", i, false))) {
|
||||
if (n->hasValue("red"))
|
||||
_red->setFloatValue(n->getFloatValue("red", 1.0));
|
||||
if (n->hasValue("green"))
|
||||
_green->setFloatValue(n->getFloatValue("green", 1.0));
|
||||
if (n->hasValue("blue"))
|
||||
_blue->setFloatValue(n->getFloatValue("blue", 1.0));
|
||||
if (n->hasValue("alpha"))
|
||||
_alpha->setFloatValue(n->getFloatValue("alpha", 0.67));
|
||||
|
|
Loading…
Add table
Reference in a new issue