public:
PickCallback(const SGPropertyNode* configNode,
SGPropertyNode* modelRoot) :
+ _button(configNode->getIntValue("button", -1)),
_repeatable(configNode->getBoolValue("repeatable", false)),
_repeatInterval(configNode->getDoubleValue("interval-sec", 0.1))
{
}
virtual bool buttonPressed(int button, const Info&)
{
+ if (0 <= _button && button != _button)
+ return false;
SGBindingList::const_iterator i;
for (i = _bindingsDown.begin(); i != _bindingsDown.end(); ++i)
(*i)->fire();
private:
SGBindingList _bindingsDown;
SGBindingList _bindingsUp;
+ int _button;
bool _repeatable;
double _repeatInterval;
double _repeatTime;