src/Main/fg_init.cxx: add support for auto-generated tooltips on animations.
Results in tooltips for instrument needles, and control surfaces. Enabled with /sim/rendering/automatic-animation-tooltips/enabled. The max number of auto-created tooltips can be specified in /sim/rendering/automatic-animation-tooltips/max-count (too many can cause problems, e.g. on 777 i had to set max to 45). src/Model/acmodel.cxx:fgLoad3DModelPanel(): pass new property values to simgear::SGModelLib::loadModel(), so we can have auto-created tooltips for animations in the user's aircraft. [This all requires matching changes to simgear.]
This commit is contained in:
parent
5af966cfcc
commit
59a7d50fb1
1 changed files with 8 additions and 2 deletions
|
@ -32,12 +32,18 @@ static osg::Node *
|
||||||
fgLoad3DModelPanel(const SGPath &path, SGPropertyNode *prop_root)
|
fgLoad3DModelPanel(const SGPath &path, SGPropertyNode *prop_root)
|
||||||
{
|
{
|
||||||
bool loadPanels = true;
|
bool loadPanels = true;
|
||||||
osg::Node* node = simgear::SGModelLib::loadModel(path.utf8Str(), prop_root, NULL, loadPanels);
|
bool autoTooltipsMaster = fgGetBool("/sim/rendering/automatic-animation-tooltips/enabled");
|
||||||
|
int autoTooltipsMasterMax = fgGetInt("/sim/rendering/automatic-animation-tooltips/max-count");
|
||||||
|
SG_LOG(SG_INPUT, SG_DEBUG, ""
|
||||||
|
<< " autoTooltipsMaster=" << autoTooltipsMaster
|
||||||
|
<< " autoTooltipsMasterMax=" << autoTooltipsMasterMax
|
||||||
|
);
|
||||||
|
osg::Node* node = simgear::SGModelLib::loadModel(path.utf8Str(), prop_root, NULL, loadPanels, autoTooltipsMaster, autoTooltipsMasterMax);
|
||||||
if (node)
|
if (node)
|
||||||
node->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
|
node->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// Implementation of FGAircraftModel
|
// Implementation of FGAircraftModel
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Reference in a new issue