define SetPadName() and GetPadName() (old name of D_PAD::SetName() and GetName()) for compatibility with existing python scripts

This commit is contained in:
jean-pierre charras 2017-10-09 09:58:15 +02:00
parent 246f8cae24
commit cb3d28f11b
1 changed files with 17 additions and 0 deletions

View File

@ -8,3 +8,20 @@
#include <class_pad.h>
%}
%extend D_PAD
{
%pythoncode
%{
# SetPadName() is the old name for D_PAD::SetName()
# define it for compatibility
def SetPadName(self, aName):
return self.SetName(aName)
# GetPadName() is the old name for D_PAD::GetName()
# define it for compatibility
def GetPadName(self):
return self.GetName()
%}
}