2012-04-19 14:35:52 +08:00
|
|
|
#ifndef __COCOS_DENSHION_TEST__
|
|
|
|
#define __COCOS_DENSHION_TEST__
|
|
|
|
|
|
|
|
#include "../testBasic.h"
|
|
|
|
|
2013-06-22 04:01:00 +08:00
|
|
|
class AudioSlider;
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
class CocosDenshionTest : public Layer
|
2011-01-19 16:00:19 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
|
|
|
CocosDenshionTest(void);
|
|
|
|
~CocosDenshionTest(void);
|
2011-01-19 16:00:19 +08:00
|
|
|
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onExit() override;
|
2011-01-19 16:00:19 +08:00
|
|
|
|
|
|
|
private:
|
2013-06-22 04:01:00 +08:00
|
|
|
void addButtons();
|
|
|
|
void addSliders();
|
|
|
|
void addChildAt(Node *node, float percentageX, float percentageY);
|
|
|
|
|
|
|
|
void updateVolumes(float);
|
|
|
|
|
2013-06-15 14:03:30 +08:00
|
|
|
unsigned int _soundId;
|
2013-06-22 04:01:00 +08:00
|
|
|
float _musicVolume;
|
|
|
|
float _effectsVolume;
|
|
|
|
AudioSlider *_sliderPitch;
|
|
|
|
AudioSlider *_sliderPan;
|
|
|
|
AudioSlider *_sliderGain;
|
|
|
|
AudioSlider *_sliderEffectsVolume;
|
|
|
|
AudioSlider *_sliderMusicVolume;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
2011-01-19 16:00:19 +08:00
|
|
|
class CocosDenshionTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__COCOS_DENSHION_TEST__
|