Merge pull request #15838 from MagicXrEv/rename-end-functions

lua binding : Rename end() to endToLua().
This commit is contained in:
minggo 2016-06-15 16:24:34 +08:00 committed by GitHub
commit d7b495c3d1
7 changed files with 16 additions and 10 deletions

View File

@ -113,12 +113,9 @@ public:
*/ */
virtual void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue); virtual void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue);
/** End is key word of lua, use other name to export to lua. /** Ends grabbing.
* @js NA * @lua endToLua
*/ */
inline void endToLua(){ end();};
/** Ends grabbing. */
virtual void end(); virtual void end();
/** Clears the texture with a color. /** Clears the texture with a color.

View File

@ -110,6 +110,7 @@ public:
* Release objects relating to AudioEngine. * Release objects relating to AudioEngine.
* *
* @warning It must be called before the application exit. * @warning It must be called before the application exit.
* @lua endToLua
*/ */
static void end(); static void end();

View File

@ -75,6 +75,9 @@ public:
virtual bool serialize(void* r) override; virtual bool serialize(void* r) override;
public: public:
/**
* @lua endToLua
*/
void end(); void end();
void preloadBackgroundMusic(const char* pszFilePath); void preloadBackgroundMusic(const char* pszFilePath);
void playBackgroundMusic(const char* pszFilePath, bool bLoop); void playBackgroundMusic(const char* pszFilePath, bool bLoop);

View File

@ -106,7 +106,10 @@ public:
*/ */
virtual ~GLView(); virtual ~GLView();
/** Force destroying EGL view, subclass must implement this method. */ /** Force destroying EGL view, subclass must implement this method.
*
* @lua endToLua
*/
virtual void end() = 0; virtual void end() = 0;
/** Get whether opengl render system is ready, subclass must implement this method. */ /** Get whether opengl render system is ready, subclass must implement this method. */

View File

@ -154,7 +154,9 @@ rename_functions = SpriteFrameCache::[addSpriteFramesWithFile=addSpriteFrames ge
LabelAtlas::[create=_create], LabelAtlas::[create=_create],
Touch::[getID=getId], Touch::[getID=getId],
FileUtils::[loadFilenameLookupDictionaryFromFile=loadFilenameLookup], FileUtils::[loadFilenameLookupDictionaryFromFile=loadFilenameLookup],
Director::[end=endToLua] Director::[end=endToLua],
GLView::[end=endToLua],
RenderTexture::[end=endToLua]
rename_classes = ParticleSystemQuad::ParticleSystem rename_classes = ParticleSystemQuad::ParticleSystem

View File

@ -40,7 +40,7 @@ classes = AudioEngine AudioProfile
skip = AudioEngine::[setFinishCallback] skip = AudioEngine::[setFinishCallback]
rename_functions = rename_functions = AudioEngine::[end=endToLua]
rename_classes = rename_classes =

View File

@ -56,8 +56,8 @@ skip = *::[^visit$ copyWith.* onEnter.* onExit.* ^description$ getObjectType .*
ActionTimeline::[setFrameEventCallFunc] ActionTimeline::[setFrameEventCallFunc]
rename_functions = ActionManagerEx::[shareManager=getInstance purgeActionManager=destroyInstance], rename_functions = ActionManagerEx::[shareManager=getInstance purgeActionManager=destroyInstance],
SceneReader::[purgeSceneReader=destroyInstance] SceneReader::[purgeSceneReader=destroyInstance],
ComAudio::[end=endToLua]
rename_classes = rename_classes =