Commit c2c5a06bbb54bc99fef5e4e08ac5840cef3d8421

Authored by David Steele
Committed by Gerrit Code Review
2 parents 62bea0fc 532c1258

Merge "Ensure Scene3d-Light exit on Escape" into devel/master

examples-reel/dali-examples-reel.cpp
... ... @@ -93,7 +93,6 @@ int DALI_EXPORT_API main(int argc, char** argv)
93 93 demo.AddExample(Example("rendering-textured-cube.example", DALI_DEMO_STR_TITLE_RENDERING_TEXTURED_CUBE));
94 94 demo.AddExample(Example("rendering-radial-progress.example", DALI_DEMO_STR_TITLE_RENDERING_RADIAL_PROGRESS));
95 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 96 demo.AddExample(Example("scene3d-light.example", DALI_DEMO_STR_TITLE_SCENE3D_LIGHT));
98 97 demo.AddExample(Example("scene3d-model.example", DALI_DEMO_STR_TITLE_SCENE3D_MODEL));
99 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 128  
129 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 137 // Respond to a touch anywhere on the window
132 138 window.GetRootLayer().TouchedSignal().Connect(this, &Scene3dLightController::OnTouch);
133 139  
... ... @@ -265,6 +271,10 @@ public:
265 271 mAnimation.SetCurrentProgress(progress);
266 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  
... ...