PuzzleSDK
UISliderTest.h
浏览该文件的文档.
1/****************************************************************************
2 Copyright (c) 2013 cocos2d-x.org
3 Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
4
5 http://www.cocos2d-x.org
6
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 THE SOFTWARE.
24 ****************************************************************************/
25
26#ifndef __TestCpp__UISliderTest__
27#define __TestCpp__UISliderTest__
28
29#include "../UIScene.h"
30
31DEFINE_TEST_SUITE(UISliderTests);
32
33class UISliderTest : public UIScene
34{
35public:
37
40 virtual bool init() override;
41 void sliderEvent(cocos2d::Ref* sender, cocos2d::ui::Slider::EventType type);
42 void printWidgetResources(cocos2d::Ref* sender);
43
44protected:
45 cocos2d::ui::TextBMFont* _displayValueLabel;
46 cocos2d::ui::Slider* _slider;
47};
48
50{
51public:
53
56 virtual bool init() override;
57 void sliderEvent(cocos2d::Ref* sender, cocos2d::ui::Slider::EventType type);
58
59protected:
60 cocos2d::ui::Text* _displayValueLabel;
61};
62
64{
65public:
67
70 virtual bool init() override;
71 void sliderEvent(cocos2d::Ref* sender, cocos2d::ui::Slider::EventType type);
72
73protected:
74 cocos2d::ui::Text* _displayValueLabel;
75};
76
77
79{
80public:
82
85 virtual bool init() override;
86
87protected:
88 cocos2d::ui::Text* _displayValueLabel;
89};
90
92{
93public:
95
98 virtual bool init() override;
99
100protected:
101 cocos2d::ui::Text* _displayValueLabel;
102};
103
105{
106public:
108
111 virtual bool init() override;
112
113protected:
114 cocos2d::ui::Text* _displayValueLabel;
115};
116
118{
119public:
121
124 virtual bool init() override;
125 void sliderEvent(cocos2d::Ref* sender, cocos2d::ui::Slider::EventType type);
126
127protected:
128 cocos2d::ui::TextBMFont* _displayValueLabel;
129};
130#endif /* defined(__TestCpp__UISliderTest__) */
DEFINE_TEST_SUITE(UISliderTests)
cocos2d::ui::Text * _displayValueLabel
Definition: UISliderTest.h:101
CREATE_FUNC(UISliderDisabledDefaultTest)
virtual bool init() override
CREATE_FUNC(UISliderIssue12249Test)
virtual bool init() override
cocos2d::ui::TextBMFont * _displayValueLabel
Definition: UISliderTest.h:128
void sliderEvent(cocos2d::Ref *sender, cocos2d::ui::Slider::EventType type)
cocos2d::ui::Text * _displayValueLabel
Definition: UISliderTest.h:114
CREATE_FUNC(UISliderNewEventCallbackTest)
virtual bool init() override
cocos2d::ui::Text * _displayValueLabel
Definition: UISliderTest.h:88
virtual bool init() override
CREATE_FUNC(UISliderNormalDefaultTest)
CREATE_FUNC(UISliderTest_Scale9_State_Change)
virtual bool init() override
cocos2d::ui::Text * _displayValueLabel
Definition: UISliderTest.h:74
void sliderEvent(cocos2d::Ref *sender, cocos2d::ui::Slider::EventType type)
void sliderEvent(cocos2d::Ref *sender, cocos2d::ui::Slider::EventType type)
CREATE_FUNC(UISliderTest_Scale9)
cocos2d::ui::Text * _displayValueLabel
Definition: UISliderTest.h:60
virtual bool init() override
CREATE_FUNC(UISliderTest)
void sliderEvent(cocos2d::Ref *sender, cocos2d::ui::Slider::EventType type)
void printWidgetResources(cocos2d::Ref *sender)
cocos2d::ui::TextBMFont * _displayValueLabel
Definition: UISliderTest.h:45
virtual bool init() override
cocos2d::ui::Slider * _slider
Definition: UISliderTest.h:46