PuzzleSDK
Bug-14327.h
浏览该文件的文档.
1/****************************************************************************
2 Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
3
4 http://www.cocos2d-x.org
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 THE SOFTWARE.
23 ****************************************************************************/
24
25#ifndef __cocos2d_tests__Bug_14327__
26#define __cocos2d_tests__Bug_14327__
27
28#include "BugsTest.h"
29
30
31#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
32
33#include "ui/UIEditBox/UIEditBox.h"
34
35class Bug14327Layer : public BugsTestBase, public cocos2d::ui::EditBoxDelegate
36{
37public:
39
40 virtual bool init() override;
41 virtual std::string title() const override { return "Bug14327";}
42
43 virtual void editBoxEditingDidBegin(cocos2d::ui::EditBox* editBox) override;
44 virtual void editBoxEditingDidEndWithAction(cocos2d::ui::EditBox* editBox, cocos2d::ui::EditBoxDelegate::EditBoxEndAction EditBoxEndAction) override;
45 virtual void editBoxTextChanged(cocos2d::ui::EditBox* editBox, const std::string& text) override;
46 virtual void editBoxReturn(cocos2d::ui::EditBox* editBox) override;
47
48protected:
49 virtual void update(float dt) override;
50
51private:
53 cocos2d::Label *_TTFShowTime;
54 cocos2d::ui::EditBox* _edit;
55};
56
57#endif
58
59#endif /* defined(__cocos2d_tests__Bug_14327__) */
virtual bool init() override
Definition: Bug-14327.cpp:40
cocos2d::Label * _TTFShowTime
Definition: Bug-14327.h:53
virtual void editBoxTextChanged(cocos2d::ui::EditBox *editBox, const std::string &text) override
Definition: Bug-14327.cpp:105
CREATE_FUNC(Bug14327Layer)
virtual std::string title() const override
Definition: Bug-14327.h:41
virtual void editBoxReturn(cocos2d::ui::EditBox *editBox) override
Definition: Bug-14327.cpp:110
virtual void editBoxEditingDidBegin(cocos2d::ui::EditBox *editBox) override
Definition: Bug-14327.cpp:95
virtual void editBoxEditingDidEndWithAction(cocos2d::ui::EditBox *editBox, cocos2d::ui::EditBoxDelegate::EditBoxEndAction EditBoxEndAction) override
Definition: Bug-14327.cpp:100
virtual void update(float dt) override
Definition: Bug-14327.cpp:76
time_t _removeTime
Definition: Bug-14327.h:52
cocos2d::ui::EditBox * _edit
Definition: Bug-14327.h:54