ToyWorksheetScene.h
1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
//  ToyWorksheetScene.h
//  SteveMaggieCpp
//
//  Created by Katarzyna Kalinowska-Górska on 18.05.2017.
//
//
#ifndef ToyWorksheetScene_h
#define ToyWorksheetScene_h
#include "ToyParentScene.h"
class ToyWorksheetScene : public ToyParentScene
{
    public:
    
        static ToyWorksheetScene* create(std::string layoutFilePath = "", std::string scenarioFilePath = "");
        bool initWithConfigurationFiles(std::string layoutFilePath,
                                                    std::string scenarioFilePath) override;
        virtual void onEnter() override;
        virtual void onEnterTransitionDidFinish() override;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
        void setAndroidBackButtonDisabled(bool disabled){androidBackButtonDisabled = disabled;};
#endif
        //ToyScenarioObject
//        virtual void setProperty(std::string propertyName, const rapidjson::Value& newValue, ActionParseDelegate* parseDelegate) override;
        virtual void callFunctionByName(std::string methodName, const rapidjson::Value* arguments, ActionParseDelegate* parseDelegate, std::function<void()> callback = [](){}) override;
    
    protected:
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
        bool androidBackButtonDisabled;
#endif
        virtual bool touchHandlerForWidget(std::string objectName, cocos2d::ui::Widget::TouchEventType touchEventType) override;
        virtual bool onBackButtonClicked();
        virtual bool onReplayButtonClicked();
        virtual bool onFastForwardButtonClicked();
};
#endif /* ToyWorksheetScene_h */
