* The test can be closed now.
Change-Id: I2f38efe998deb505d67dc969f7c6f16d338a2fc5
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
void Create( Application& application )
{
Stage stage = Stage::GetCurrent();
void Create( Application& application )
{
Stage stage = Stage::GetCurrent();
+ stage.KeyEventSignal().Connect(this, &SimpleTextFieldExample::OnKeyEvent);
stage.SetBackgroundColor( Vector4( 0.04f, 0.345f, 0.392f, 1.0f ) );
TextField field = TextField::New();
stage.SetBackgroundColor( Vector4( 0.04f, 0.345f, 0.392f, 1.0f ) );
TextField field = TextField::New();
+ /**
+ * Main key event handler
+ */
+ void OnKeyEvent(const KeyEvent& event)
+ {
+ if(event.state == KeyEvent::Down)
+ {
+ if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) )
+ {
+ mApplication.Quit();
+ }
+ }
+ }
+
private:
Application& mApplication;
private:
Application& mApplication;