static FGPanelAction *
readAction (const SGPropertyNode * node, float w_scale, float h_scale)
{
+ unsigned int i, j;
+ SGPropertyNode *binding;
+ vector<SGPropertyNode_ptr>bindings = node->getChildren("binding");
+
+ // button-less actions are fired initially
+ if (!node->hasValue("w") || !node->hasValue("h")) {
+ for (i = 0; i < bindings.size(); i++) {
+ FGBinding b(bindings[i]);
+ b.fire();
+ }
+ return 0;
+ }
+
string name = node->getStringValue("name");
int button = node->getIntValue("button");
FGPanelAction * action = new FGPanelAction(button, x, y, w, h, repeatable);
- vector<SGPropertyNode_ptr>bindings = node->getChildren("binding");
SGPropertyNode * dest = fgGetNode("/sim/bindings/panel", true);
- SGPropertyNode *binding;
- unsigned int i, j;
for (i = 0; i < bindings.size(); i++) {
SG_LOG(SG_INPUT, SG_INFO, "Reading binding "
<< bindings[i]->getStringValue("command"));
string type = node->getStringValue("type");
int w = node->getIntValue("w", -1);
int h = node->getIntValue("h", -1);
+ bool emissive = node->getBoolValue("emissive", false);
if (w != -1)
w = int(w * w_scale);
if (h != -1)
if (type == "texture") {
FGCroppedTexture texture = readTexture(node->getNode("texture"));
layer = new FGTexturedLayer(texture, w, h);
+ if (emissive) {
+ FGTexturedLayer *tl=(FGTexturedLayer*)layer;
+ tl->setEmissive(true);
+ }
+
}
// A group of sublayers.