2013-09-16 20:54:13 +08:00
|
|
|
/****************************************************************************
|
|
|
|
Copyright (c) 2013 cocos2d-x.org
|
|
|
|
|
|
|
|
http://www.cocos2d-x.org
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
THE SOFTWARE.
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __TestCpp__UIButtonTest__
|
|
|
|
#define __TestCpp__UIButtonTest__
|
|
|
|
|
|
|
|
#include "../UIScene.h"
|
|
|
|
|
|
|
|
class UIButtonTest : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UIButtonTest();
|
|
|
|
~UIButtonTest();
|
|
|
|
bool init();
|
2014-05-09 14:30:39 +08:00
|
|
|
void touchEvent(Ref *pSender, Widget::TouchEventType type);
|
2013-09-16 20:54:13 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
UI_SCENE_CREATE_FUNC(UIButtonTest)
|
2014-03-04 16:51:35 +08:00
|
|
|
Text* _displayValueLabel;
|
2013-09-16 20:54:13 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class UIButtonTest_Scale9 : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UIButtonTest_Scale9();
|
|
|
|
~UIButtonTest_Scale9();
|
|
|
|
bool init();
|
2014-05-09 14:30:39 +08:00
|
|
|
void touchEvent(Ref *pSender, Widget::TouchEventType type);
|
2013-09-16 20:54:13 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
UI_SCENE_CREATE_FUNC(UIButtonTest_Scale9)
|
2014-03-04 16:51:35 +08:00
|
|
|
Text* _displayValueLabel;
|
2013-09-16 20:54:13 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class UIButtonTest_PressedAction : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UIButtonTest_PressedAction();
|
|
|
|
~UIButtonTest_PressedAction();
|
|
|
|
bool init();
|
2014-05-09 14:30:39 +08:00
|
|
|
void touchEvent(Ref *pSender, Widget::TouchEventType type);
|
2013-09-16 20:54:13 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
UI_SCENE_CREATE_FUNC(UIButtonTest_PressedAction)
|
2014-03-04 16:51:35 +08:00
|
|
|
Text* _displayValueLabel;
|
2013-12-23 15:35:35 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class UIButtonTest_Title : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UIButtonTest_Title();
|
|
|
|
~UIButtonTest_Title();
|
|
|
|
bool init();
|
2014-05-09 14:30:39 +08:00
|
|
|
void touchEvent(Ref *pSender, Widget::TouchEventType type);
|
2013-12-23 15:35:35 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
UI_SCENE_CREATE_FUNC(UIButtonTest_Title)
|
2014-03-04 16:51:35 +08:00
|
|
|
Text* _displayValueLabel;
|
2013-09-16 20:54:13 +08:00
|
|
|
};
|
|
|
|
|
2014-07-25 14:40:58 +08:00
|
|
|
class UIButtonTestRemoveSelf : public UIScene
|
2014-07-23 18:52:03 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-07-25 14:40:58 +08:00
|
|
|
UIButtonTestRemoveSelf();
|
|
|
|
~UIButtonTestRemoveSelf();
|
2014-07-23 18:52:03 +08:00
|
|
|
bool init();
|
|
|
|
void touchEvent(Ref *pSender, Widget::TouchEventType type);
|
|
|
|
|
|
|
|
protected:
|
2014-07-25 14:40:58 +08:00
|
|
|
UI_SCENE_CREATE_FUNC(UIButtonTestRemoveSelf)
|
2014-07-23 18:52:03 +08:00
|
|
|
Text* _displayValueLabel;
|
|
|
|
};
|
|
|
|
|
2014-07-31 11:07:20 +08:00
|
|
|
class UIButtonTestSwitchScale9 : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UIButtonTestSwitchScale9();
|
|
|
|
~UIButtonTestSwitchScale9();
|
|
|
|
bool init();
|
|
|
|
void touchEvent(Ref *pSender, Widget::TouchEventType type);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
UI_SCENE_CREATE_FUNC(UIButtonTestSwitchScale9)
|
|
|
|
Text* _displayValueLabel;
|
|
|
|
};
|
|
|
|
|
2014-08-14 11:14:24 +08:00
|
|
|
class UIButtonTestZoomScale : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UIButtonTestZoomScale();
|
|
|
|
~UIButtonTestZoomScale();
|
|
|
|
bool init();
|
|
|
|
void sliderEvent(Ref* pSender, Slider::EventType type);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
UI_SCENE_CREATE_FUNC(UIButtonTestZoomScale)
|
|
|
|
Text* _displayValueLabel;
|
|
|
|
};
|
|
|
|
|
2014-09-12 13:50:13 +08:00
|
|
|
class UIButtonTextOnly : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UIButtonTextOnly();
|
|
|
|
~UIButtonTextOnly();
|
|
|
|
bool init();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
UI_SCENE_CREATE_FUNC(UIButtonTextOnly)
|
|
|
|
Text* _displayValueLabel;
|
|
|
|
};
|
2014-09-12 14:24:27 +08:00
|
|
|
|
|
|
|
class UIButtonIgnoreContentSizeTest : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UIButtonIgnoreContentSizeTest();
|
|
|
|
~UIButtonIgnoreContentSizeTest();
|
|
|
|
bool init();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
UI_SCENE_CREATE_FUNC(UIButtonIgnoreContentSizeTest)
|
|
|
|
Text* _displayValueLabel;
|
|
|
|
};
|
2014-09-17 10:57:40 +08:00
|
|
|
|
|
|
|
class UIButtonTitleEffectTest : public UIScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UIButtonTitleEffectTest();
|
|
|
|
~UIButtonTitleEffectTest();
|
|
|
|
bool init();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
UI_SCENE_CREATE_FUNC(UIButtonTitleEffectTest)
|
|
|
|
Text* _displayValueLabel;
|
|
|
|
};
|
2013-09-16 20:54:13 +08:00
|
|
|
#endif /* defined(__TestCpp__UIButtonTest__) */
|