Updated demos to use DALi clang-format
[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-toolkit/public-api/controls/text-controls/text-label.h>
22 #include <dali/public-api/actors/actor.h>
23 #include <dali/public-api/adaptor-framework/window.h>
24 #include <dali/public-api/render-tasks/render-task.h>
25 #include <dali/public-api/signals/connection-tracker.h>
26
27 class FppGameTutorialController : public Dali::ConnectionTracker
28 {
29 public:
30   /**
31    * Creates new instance of FppGameTutorialController
32    */
33   FppGameTutorialController();
34
35   /**
36    * Destroys instance of FppGameTutorialController
37    */
38   ~FppGameTutorialController();
39
40   /**
41    * Displays UI with tutorial
42    * @param[in] window The window to display the tutorial on
43    */
44   void DisplayTutorial(Dali::Window window);
45
46   /**
47    * Handles tutorial touch input
48    * @param[in] touchEvent Incoming touch event in the UI space
49    */
50   void OnTouch(const Dali::TouchEvent& touchEvent);
51
52   /**
53    * Handles tutorial animation finished signal
54    * @param[in] animation Animation object
55    */
56   void OnTutorialAnimationFinished(Dali::Animation& animation);
57
58   /**
59    * Handles tutorial completion window
60    * @param animation Animation object
61    */
62   void OnTutorialComplete(Dali::Animation& animation);
63
64 private:
65   Dali::RenderTask         mTutorialRenderTask;    /// RenderTask associated with rendering tutorial
66   Dali::Actor              mUiRoot;                /// The parent actor for tutorial UI
67   Dali::Toolkit::TextLabel mLeftLabel;             /// Text label displaying left message
68   Dali::Toolkit::TextLabel mRightLabel;            /// Text label displaying right message
69   bool                     mLeftTutorialComplete;  /// Flag indicating the walk (left) tutorial action has been performed
70   bool                     mRightTutorialComplete; /// Flag indicating the look (right) tutorial action has been performed
71   Dali::Window             mWindow;
72 };
73
74 #endif // FPPGAMETUTORIAL_H