cafdeb6790fb6f77094b80cf9f6f109a55122e62
[platform/core/uifw/dali-demo.git] / examples / fpp-game / fpp-game-tutorial-controller.h
1 #ifndef FPPGAMETUTORIAL_H
2 #define FPPGAMETUTORIAL_H
3
4 /*
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 #include <dali/public-api/actors/actor.h>
22 #include <dali/public-api/render-tasks/render-task.h>
23 #include <dali/public-api/signals/connection-tracker.h>
24 #include <dali/public-api/adaptor-framework/window.h>
25 #include <dali-toolkit/public-api/controls/text-controls/text-label.h>
26
27 class FppGameTutorialController : public Dali::ConnectionTracker
28 {
29 public:
30
31   /**
32    * Creates new instance of FppGameTutorialController
33    */
34   FppGameTutorialController();
35
36   /**
37    * Destroys instance of FppGameTutorialController
38    */
39   ~FppGameTutorialController();
40
41   /**
42    * Displays UI with tutorial
43    * @param[in] window The window to display the tutorial on
44    */
45   void DisplayTutorial( Dali::Window window );
46
47   /**
48    * Handles tutorial touch input
49    * @param[in] touchEvent Incoming touch event in the UI space
50    */
51   void OnTouch( const Dali::TouchData& touchEvent );
52
53   /**
54    * Handles tutorial animation finished signal
55    * @param[in] animation Animation object
56    */
57   void OnTutorialAnimationFinished( Dali::Animation& animation );
58
59   /**
60    * Handles tutorial completion window
61    * @param animation Animation object
62    */
63   void OnTutorialComplete( Dali::Animation& animation );
64
65 private:
66
67   Dali::RenderTask              mTutorialRenderTask; /// RenderTask associated with rendering tutorial
68   Dali::Actor                   mUiRoot; /// The parent actor for tutorial UI
69   Dali::Toolkit::TextLabel      mLeftLabel; /// Text label displaying left message
70   Dali::Toolkit::TextLabel      mRightLabel; /// Text label displaying right message
71   bool                          mLeftTutorialComplete; /// Flag indicating the walk (left) tutorial action has been performed
72   bool                          mRightTutorialComplete; /// Flag indicating the look (right) tutorial action has been performed
73   Dali::Window                  mWindow;
74 };
75
76 #endif // FPPGAMETUTORIAL_H