diff options
author | David Steele <david.steele@samsung.com> | 2016-08-04 16:15:19 +0100 |
---|---|---|
committer | David Steele <david.steele@samsung.com> | 2016-08-04 08:24:47 -0700 |
commit | 68084ad1ce68796f9ae1db1cd6692ffaa5d5e3c9 (patch) | |
tree | 51c1cd849705d0ac6810ee17ce8e88bd7b729048 /examples/tilt | |
parent | 799c9609fbd3526e10f180537d35c9391163ff04 (diff) | |
download | dali-demo-68084ad1ce68796f9ae1db1cd6692ffaa5d5e3c9.tar.gz dali-demo-68084ad1ce68796f9ae1db1cd6692ffaa5d5e3c9.tar.bz2 dali-demo-68084ad1ce68796f9ae1db1cd6692ffaa5d5e3c9.zip |
Updated demos to remove indicator where appropriate
Removed indicator from demo toolbar, and from other examples that
don't use toolbar and have a UI at the top of the display.
Change-Id: Ifd3b3c5f916f249f492ff154a0ca28054763ee6e
Signed-off-by: David Steele <david.steele@samsung.com>
Diffstat (limited to 'examples/tilt')
-rw-r--r-- | examples/tilt/tilt-example.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/tilt/tilt-example.cpp b/examples/tilt/tilt-example.cpp index 0adc72e3..230704ae 100644 --- a/examples/tilt/tilt-example.cpp +++ b/examples/tilt/tilt-example.cpp @@ -59,6 +59,9 @@ public: stage.GetRootLayer().TouchSignal().Connect( this, &TiltController::OnTouch ); CreateSensor(); + + // Connect signals to allow Back and Escape to exit. + stage.KeyEventSignal().Connect( this, &TiltController::OnKeyEvent ); } void CreateSensor() @@ -88,6 +91,21 @@ public: mTextLabel.RotateBy(pitchRot);; } + /** + * @brief OnKeyEvent signal handler. + * @param[in] event The key event information + */ + void OnKeyEvent( const KeyEvent& event ) + { + if( event.state == KeyEvent::Down ) + { + if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) + { + mApplication.Quit(); + } + } + } + private: Application& mApplication; TiltSensor mTiltSensor; |