#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sg_path.hxx>
#include <simgear/props/props.hxx>
+#include <simgear/props/props_io.hxx>
#include <istream>
#include <fstream>
if (bgTexture.empty())
bgTexture = "FOO";
panel->setBackground(FGTextureManager::createTexture(bgTexture.c_str()));
- SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << bgTexture );
//
// Get multibackground if any...
string mbgTexture = root->getStringValue("multibackground[0]");
if (!mbgTexture.empty()) {
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 0);
- SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
mbgTexture = root->getStringValue("multibackground[1]");
if (mbgTexture.empty())
mbgTexture = "FOO";
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 1);
- SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
mbgTexture = root->getStringValue("multibackground[2]");
if (mbgTexture.empty())
mbgTexture = "FOO";
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 2);
- SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
mbgTexture = root->getStringValue("multibackground[3]");
if (mbgTexture.empty())
mbgTexture = "FOO";
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 3);
- SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
mbgTexture = root->getStringValue("multibackground[4]");
if (mbgTexture.empty())
mbgTexture = "FOO";
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 4);
- SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
mbgTexture = root->getStringValue("multibackground[5]");
if (mbgTexture.empty())
mbgTexture = "FOO";
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 5);
- SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
mbgTexture = root->getStringValue("multibackground[6]");
if (mbgTexture.empty())
mbgTexture = "FOO";
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 6);
- SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
mbgTexture = root->getStringValue("multibackground[7]");
if (mbgTexture.empty())
mbgTexture = "FOO";
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 7);
- SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
}
//
// Create each instrument.
//
- SG_LOG( SG_COCKPIT, SG_INFO, "Reading panel instruments" );
+ SG_LOG( SG_COCKPIT, SG_DEBUG, "Reading panel instruments" );
const SGPropertyNode * instrument_group = root->getChild("instruments");
if (instrument_group != 0) {
int nInstruments = instrument_group->nChildren();
SG_LOG( SG_COCKPIT, SG_WARN, "Unknown special instrument found" );
}
} else {
- SG_LOG( SG_COCKPIT, SG_INFO, "Skipping " << node->getName()
+ SG_LOG( SG_COCKPIT, SG_WARN, "Skipping " << node->getName()
<< " in instruments section" );
}
}
}
- SG_LOG( SG_COCKPIT, SG_INFO, "Done reading panel instruments" );
+ SG_LOG( SG_COCKPIT, SG_BULK, "Done reading panel instruments" );
//
FGPanel *
fgReadPanel (const string &relative_path)
{
- SGPath path(globals->get_fg_root());
- path.append(relative_path);
+ SGPath path = globals->resolve_aircraft_path(relative_path);
SGPropertyNode root;
-
+
try {
readProperties(path.str(), &root);
} catch (const sg_exception &e) {