Fixed handling of setting member variables via the Serializers when the value is the default.
Added support for more features of the osgDB::Widget class. Fixed handling of boolean values in the Lua plugin
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
struct CreateGraphics : public osgDB::MethodObject
|
||||
{
|
||||
virtual bool run(void* objectPtr, osg::Parameters& inputParameters, osg::Parameters& outputParameters) const
|
||||
virtual bool run(void* objectPtr, osg::Parameters&, osg::Parameters&) const
|
||||
{
|
||||
osgGA::Widget* widget = reinterpret_cast<osgGA::Widget*>(objectPtr);
|
||||
widget->createGraphics();
|
||||
@@ -16,7 +16,7 @@ struct CreateGraphics : public osgDB::MethodObject
|
||||
|
||||
struct CreateGraphicsImplementation : public osgDB::MethodObject
|
||||
{
|
||||
virtual bool run(void* objectPtr, osg::Parameters& inputParameters, osg::Parameters& outputParameters) const
|
||||
virtual bool run(void* objectPtr, osg::Parameters&, osg::Parameters&) const
|
||||
{
|
||||
osgGA::Widget* widget = reinterpret_cast<osgGA::Widget*>(objectPtr);
|
||||
widget->createGraphicsImplementation();
|
||||
@@ -24,6 +24,45 @@ struct CreateGraphicsImplementation : public osgDB::MethodObject
|
||||
}
|
||||
};
|
||||
|
||||
struct Enter : public osgDB::MethodObject
|
||||
{
|
||||
virtual bool run(void* objectPtr, osg::Parameters&, osg::Parameters&) const
|
||||
{
|
||||
osgGA::Widget* widget = reinterpret_cast<osgGA::Widget*>(objectPtr);
|
||||
widget->enter();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
struct EnterImplementation : public osgDB::MethodObject
|
||||
{
|
||||
virtual bool run(void* objectPtr, osg::Parameters&, osg::Parameters&) const
|
||||
{
|
||||
osgGA::Widget* widget = reinterpret_cast<osgGA::Widget*>(objectPtr);
|
||||
widget->enterImplementation();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
struct Leave : public osgDB::MethodObject
|
||||
{
|
||||
virtual bool run(void* objectPtr, osg::Parameters&, osg::Parameters&) const
|
||||
{
|
||||
osgGA::Widget* widget = reinterpret_cast<osgGA::Widget*>(objectPtr);
|
||||
widget->leave();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
struct LeaveImplementation : public osgDB::MethodObject
|
||||
{
|
||||
virtual bool run(void* objectPtr, osg::Parameters&, osg::Parameters&) const
|
||||
{
|
||||
osgGA::Widget* widget = reinterpret_cast<osgGA::Widget*>(objectPtr);
|
||||
widget->leaveImplementation();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
REGISTER_OBJECT_WRAPPER( Widget,
|
||||
new osgGA::Widget,
|
||||
@@ -36,7 +75,16 @@ REGISTER_OBJECT_WRAPPER( Widget,
|
||||
ADD_ENUM_VALUE( EVENT_DRIVEN_FOCUS_DISABLED );
|
||||
END_ENUM_SERIALIZER();
|
||||
|
||||
ADD_BOOL_SERIALIZER(HasEventFocus, false);
|
||||
|
||||
ADD_METHOD_OBJECT( "createGraphics", CreateGraphics );
|
||||
ADD_METHOD_OBJECT( "createGraphicsImplementation", CreateGraphicsImplementation );
|
||||
|
||||
ADD_METHOD_OBJECT( "enter", Enter );
|
||||
ADD_METHOD_OBJECT( "enterImplementation", EnterImplementation );
|
||||
|
||||
ADD_METHOD_OBJECT( "leave", Leave );
|
||||
ADD_METHOD_OBJECT( "leaveImplementation", LeaveImplementation );
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user