X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCockpit%2Fpanel_io.cxx;h=64641b5f74c8f4db7aa569848e63216fe1644f74;hb=c0b4531d04215f76f9cf65afbdaed6b7c0b32634;hp=f6b114645575d2ba478f306c779a889e7c009fcd;hpb=191bb2188835c7fd046b8eb0090a6f529973f1b8;p=flightgear.git diff --git a/src/Cockpit/panel_io.cxx b/src/Cockpit/panel_io.cxx index f6b114645..64641b5f7 100644 --- a/src/Cockpit/panel_io.cxx +++ b/src/Cockpit/panel_io.cxx @@ -29,11 +29,10 @@ #include // for strcmp() #include -#include - -#include +#include #include -#include +#include +#include #include STL_IOSTREAM #include STL_FSTREAM @@ -44,7 +43,7 @@ #include -#include "panel.hxx" +// #include "panel.hxx" #include "panel_io.hxx" //built-in layers @@ -132,12 +131,13 @@ readTexture (const SGPropertyNode * node) //////////////////////////////////////////////////////////////////////// static void -readConditions (FGConditional * component, const SGPropertyNode * node) +readConditions (SGConditional *component, const SGPropertyNode *node) { const SGPropertyNode * conditionNode = node->getChild("condition"); if (conditionNode != 0) // The top level is implicitly AND - component->setCondition(fgReadCondition(conditionNode)); + component->setCondition(sgReadCondition(globals->get_props(), + conditionNode) ); } @@ -238,7 +238,7 @@ readTransformation (const SGPropertyNode * node, float w_scale, float h_scale) SGPropertyNode * target = 0; if (type.empty()) { - SG_LOG( SG_COCKPIT, SG_ALERT, + SG_LOG( SG_COCKPIT, SG_INFO, "No type supplied for transformation " << name << " assuming \"rotation\"" ); type = "rotation"; @@ -365,9 +365,11 @@ readTextChunk (const SGPropertyNode * node) else if (type == "number-value") { string propName = node->getStringValue("property"); float scale = node->getFloatValue("scale", 1.0); + float offset = node->getFloatValue("offset", 0.0); + bool truncation = node->getBoolValue("truncate", false); SGPropertyNode * target = fgGetNode(propName.c_str(), true); chunk = new FGTextLayer::Chunk(FGTextLayer::DOUBLE_VALUE, target, - format, scale); + format, scale, offset, truncation); } // Unknown type. @@ -418,7 +420,7 @@ readLayer (const SGPropertyNode * node, float w_scale, float h_scale) if (type.empty()) { - SG_LOG( SG_COCKPIT, SG_ALERT, + SG_LOG( SG_COCKPIT, SG_INFO, "No type supplied for layer " << name << " assuming \"texture\"" ); type = "texture";