Commit 532c1258146e3c9d6fd75e7f284aaa8339a8b79a
1 parent
14e75524
Ensure Scene3d-Light exit on Escape
Removed duplicate example (it's in demo) Change-Id: I1ed0752aaf71726e990e3ce89e1e3c6cb2166657 Signed-off-by: David Steele <david.steele@samsung.com>
Showing
2 changed files
with
10 additions
and
1 deletions
examples-reel/dali-examples-reel.cpp
| @@ -93,7 +93,6 @@ int DALI_EXPORT_API main(int argc, char** argv) | @@ -93,7 +93,6 @@ int DALI_EXPORT_API main(int argc, char** argv) | ||
| 93 | demo.AddExample(Example("rendering-textured-cube.example", DALI_DEMO_STR_TITLE_RENDERING_TEXTURED_CUBE)); | 93 | demo.AddExample(Example("rendering-textured-cube.example", DALI_DEMO_STR_TITLE_RENDERING_TEXTURED_CUBE)); |
| 94 | demo.AddExample(Example("rendering-radial-progress.example", DALI_DEMO_STR_TITLE_RENDERING_RADIAL_PROGRESS)); | 94 | demo.AddExample(Example("rendering-radial-progress.example", DALI_DEMO_STR_TITLE_RENDERING_RADIAL_PROGRESS)); |
| 95 | demo.AddExample(Example("ray-marching.example", DALI_DEMO_STR_TITLE_RENDERING_RAY_MARCHING)); | 95 | demo.AddExample(Example("ray-marching.example", DALI_DEMO_STR_TITLE_RENDERING_RAY_MARCHING)); |
| 96 | - demo.AddExample(Example("scene3d.example", DALI_DEMO_STR_TITLE_SCENE3D)); | ||
| 97 | demo.AddExample(Example("scene3d-light.example", DALI_DEMO_STR_TITLE_SCENE3D_LIGHT)); | 96 | demo.AddExample(Example("scene3d-light.example", DALI_DEMO_STR_TITLE_SCENE3D_LIGHT)); |
| 98 | demo.AddExample(Example("scene3d-model.example", DALI_DEMO_STR_TITLE_SCENE3D_MODEL)); | 97 | demo.AddExample(Example("scene3d-model.example", DALI_DEMO_STR_TITLE_SCENE3D_MODEL)); |
| 99 | demo.AddExample(Example("scroll-view.example", DALI_DEMO_STR_TITLE_SCROLL_VIEW)); | 98 | demo.AddExample(Example("scroll-view.example", DALI_DEMO_STR_TITLE_SCROLL_VIEW)); |
examples/scene3d-light/scene3d-light-example.cpp
| @@ -128,6 +128,12 @@ public: | @@ -128,6 +128,12 @@ public: | ||
| 128 | 128 | ||
| 129 | window.Add(sceneView); | 129 | window.Add(sceneView); |
| 130 | 130 | ||
| 131 | + auto text = TextLabel::New("Press keys 0-9 to change lighting"); | ||
| 132 | + text[Actor::Property::PARENT_ORIGIN]=ParentOrigin::BOTTOM_CENTER; | ||
| 133 | + text[Actor::Property::ANCHOR_POINT]=AnchorPoint::BOTTOM_CENTER; | ||
| 134 | + text[TextLabel::Property::TEXT_COLOR] = Color::BLACK; | ||
| 135 | + window.Add(text); | ||
| 136 | + | ||
| 131 | // Respond to a touch anywhere on the window | 137 | // Respond to a touch anywhere on the window |
| 132 | window.GetRootLayer().TouchedSignal().Connect(this, &Scene3dLightController::OnTouch); | 138 | window.GetRootLayer().TouchedSignal().Connect(this, &Scene3dLightController::OnTouch); |
| 133 | 139 | ||
| @@ -265,6 +271,10 @@ public: | @@ -265,6 +271,10 @@ public: | ||
| 265 | mAnimation.SetCurrentProgress(progress); | 271 | mAnimation.SetCurrentProgress(progress); |
| 266 | mAnimation.Pause(); | 272 | mAnimation.Pause(); |
| 267 | } | 273 | } |
| 274 | + else if(IsKey(event, Dali::DALI_KEY_ESCAPE) || IsKey(event, Dali::DALI_KEY_BACK)) | ||
| 275 | + { | ||
| 276 | + mApplication.Quit(); | ||
| 277 | + } | ||
| 268 | } | 278 | } |
| 269 | } | 279 | } |
| 270 | 280 |