C++
Example call
SonarCocosHelper::UI::methodToCall( );
Constructor
UI( );
Adds a audio toggle button (sounds effects and music)
void AddAudioToggle( const std::string &onButton, const std::string &onButtonPressed, const std::string &offButton, const std::string &offButtonPressed, cocos2d::Layer *layer, int position );
Set the audio toggle button position
void SetAudioButtonPosition( float xPos, float yPos );
Adds a sound effects toggle button
void AddSoundEffectsToggle( const std::string &onButton, const std::string &onButtonPressed, const std::string &offButton, const std::string &offButtonPressed, cocos2d::Layer *layer, int position );
Set the sound effects toggle button position
void SetSoundEffectsButtonPosition( float xPos, float yPos );
Adds a music toggle button
void AddMusicToggle( const std::string &onButton, const std::string &onButtonPressed, const std::string &offButton, const std::string &offButtonPressed, cocos2d::Layer *layer, int position );
Set the music toggle button position
void SetMusicButtonPosition( float xPos, float yPos );
JavaScript
Example call
SonarCocosHelper.UI.methodToCall( );
Adds a audio toggle button (sounds effects and music)
SonarCocosHelper.UI.AddAudioToggle = function ( onButton, onButtonPressed, offButton, offButtonPressed, layer, position )
Set the audio toggle button position
SonarCocosHelper.UI.SetAudioButtonPosition = function( xPos, yPos )
Adds a sound effects toggle button
SonarCocosHelper.UI.AddSoundEffectsToggle = function ( onButton, onButtonPressed, offButton, offButtonPressed, layer, position )
Set the sound effects toggle button position
SonarCocosHelper.UI.SetSoundEffectsButtonPosition = function( xPos, yPos )
Adds a music toggle button
SonarCocosHelper.UI.AddMusicToggle = function ( onButton, onButtonPressed, offButton, offButtonPressed, layer, position )
Set the music toggle button position
SonarCocosHelper.UI.SetMusicButtonPosition = function( xPos, yPos )