axmol/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.h

45 lines
1.2 KiB
C
Raw Normal View History

2014-05-09 11:30:07 +08:00
#ifndef __tests__VideoPlayerTest__
#define __tests__VideoPlayerTest__
#include "../UIScene.h"
DEFINE_TEST_SUITE(VideoPlayerTests);
2014-05-09 11:30:07 +08:00
class VideoPlayerTest : public UIScene
{
public:
CREATE_FUNC(VideoPlayerTest);
virtual bool init() override;
void menuCloseCallback(cocos2d::Ref* sender);
void menuRatioCallback(cocos2d::Ref* sender);
void menuResourceVideoCallback(cocos2d::Ref* sender);
void menuOnlineVideoCallback(cocos2d::Ref* sender);
void menuFullScreenCallback(cocos2d::Ref* sender);
void menuPauseCallback(cocos2d::Ref* sender);
void menuResumeCallback(cocos2d::Ref* sender);
void menuStopCallback(cocos2d::Ref* sender);
void menuHintCallback(cocos2d::Ref* sender);
void sliderCallback(cocos2d::Ref* sender, cocos2d::ui::Slider::EventType eventType);
2015-04-09 12:23:47 +08:00
void videoEventCallback(cocos2d::Ref* sender, cocos2d::experimental::ui::VideoPlayer::EventType eventType);
private:
void createVideo();
void createSlider();
cocos2d::MenuItemFont* _hintItem;
2015-04-09 12:23:47 +08:00
cocos2d::experimental::ui::VideoPlayer* _videoPlayer;
cocos2d::Label* _videoStateLabel;
cocos2d::Rect _visibleRect;
cocos2d::Layer* _rootLayer;
};
2014-05-09 11:30:07 +08:00
#endif // __tests__VideoPlayerTest__