Commit 68084ad1ce68796f9ae1db1cd6692ffaa5d5e3c9
1 parent
799c9609
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>
Showing
10 changed files
with
46 additions
and
0 deletions
examples/blocks/blocks-example.cpp
| @@ -228,6 +228,9 @@ public: | @@ -228,6 +228,9 @@ public: | ||
| 228 | { | 228 | { |
| 229 | Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); | 229 | Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); |
| 230 | 230 | ||
| 231 | + // Hide the indicator bar | ||
| 232 | + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); | ||
| 233 | + | ||
| 231 | // Creates a default view with a default tool bar. | 234 | // Creates a default view with a default tool bar. |
| 232 | // The view is added to the stage. | 235 | // The view is added to the stage. |
| 233 | Toolkit::ToolBar toolBar; | 236 | Toolkit::ToolBar toolBar; |
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
| @@ -175,6 +175,9 @@ public: | @@ -175,6 +175,9 @@ public: | ||
| 175 | // Get a handle to the stage | 175 | // Get a handle to the stage |
| 176 | Stage stage = Stage::GetCurrent(); | 176 | Stage stage = Stage::GetCurrent(); |
| 177 | 177 | ||
| 178 | + // Hide the indicator bar | ||
| 179 | + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); | ||
| 180 | + | ||
| 178 | // Background image: | 181 | // Background image: |
| 179 | Dali::Property::Map backgroundImage; | 182 | Dali::Property::Map backgroundImage; |
| 180 | backgroundImage.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE ); | 183 | backgroundImage.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE ); |
examples/image-view-svg/image-view-svg-example.cpp
| @@ -66,6 +66,9 @@ public: | @@ -66,6 +66,9 @@ public: | ||
| 66 | Vector2 stageSize = stage.GetSize(); | 66 | Vector2 stageSize = stage.GetSize(); |
| 67 | mActorSize = stageSize/2.f; | 67 | mActorSize = stageSize/2.f; |
| 68 | 68 | ||
| 69 | + // Hide the indicator bar | ||
| 70 | + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); | ||
| 71 | + | ||
| 69 | stage.KeyEventSignal().Connect(this, &ImageSvgController::OnKeyEvent); | 72 | stage.KeyEventSignal().Connect(this, &ImageSvgController::OnKeyEvent); |
| 70 | 73 | ||
| 71 | // Background, for receiving gestures | 74 | // Background, for receiving gestures |
examples/native-image-source/native-image-source-example.cpp
| @@ -146,6 +146,10 @@ public: | @@ -146,6 +146,10 @@ public: | ||
| 146 | // Get a handle to the stage | 146 | // Get a handle to the stage |
| 147 | Stage stage = Stage::GetCurrent(); | 147 | Stage stage = Stage::GetCurrent(); |
| 148 | stage.SetBackgroundColor( Color::WHITE ); | 148 | stage.SetBackgroundColor( Color::WHITE ); |
| 149 | + | ||
| 150 | + // Hide the indicator bar | ||
| 151 | + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); | ||
| 152 | + | ||
| 149 | stage.KeyEventSignal().Connect(this, &NativeImageSourceController::OnKeyEvent); | 153 | stage.KeyEventSignal().Connect(this, &NativeImageSourceController::OnKeyEvent); |
| 150 | 154 | ||
| 151 | mButtonRefreshAlways = PushButton::New(); | 155 | mButtonRefreshAlways = PushButton::New(); |
examples/page-turn-view/page-turn-view-example.cpp
| @@ -242,6 +242,9 @@ void PageTurnController::OnInit( Application& app ) | @@ -242,6 +242,9 @@ void PageTurnController::OnInit( Application& app ) | ||
| 242 | 242 | ||
| 243 | Stage::GetCurrent().KeyEventSignal().Connect(this, &PageTurnController::OnKeyEvent); | 243 | Stage::GetCurrent().KeyEventSignal().Connect(this, &PageTurnController::OnKeyEvent); |
| 244 | 244 | ||
| 245 | + // Hide the indicator bar | ||
| 246 | + app.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); | ||
| 247 | + | ||
| 245 | Stage stage = Stage::GetCurrent(); | 248 | Stage stage = Stage::GetCurrent(); |
| 246 | Vector2 stageSize = stage.GetSize(); | 249 | Vector2 stageSize = stage.GetSize(); |
| 247 | 250 |
examples/primitive-shapes/primitive-shapes-example.cpp
| @@ -68,6 +68,9 @@ public: | @@ -68,6 +68,9 @@ public: | ||
| 68 | Stage stage = Stage::GetCurrent(); | 68 | Stage stage = Stage::GetCurrent(); |
| 69 | stage.SetBackgroundColor( Color::WHITE ); | 69 | stage.SetBackgroundColor( Color::WHITE ); |
| 70 | 70 | ||
| 71 | + // Hide the indicator bar | ||
| 72 | + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); | ||
| 73 | + | ||
| 71 | //Set up layer to place UI on. | 74 | //Set up layer to place UI on. |
| 72 | Layer layer = Layer::New(); | 75 | Layer layer = Layer::New(); |
| 73 | layer.SetParentOrigin( ParentOrigin::CENTER ); | 76 | layer.SetParentOrigin( ParentOrigin::CENTER ); |
examples/renderer-stencil/renderer-stencil-example.cpp
| @@ -116,6 +116,9 @@ private: | @@ -116,6 +116,9 @@ private: | ||
| 116 | { | 116 | { |
| 117 | Stage stage = Stage::GetCurrent(); | 117 | Stage stage = Stage::GetCurrent(); |
| 118 | 118 | ||
| 119 | + // Hide the indicator bar | ||
| 120 | + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); | ||
| 121 | + | ||
| 119 | // Creates the background image. | 122 | // Creates the background image. |
| 120 | Toolkit::Control background = Dali::Toolkit::Control::New(); | 123 | Toolkit::Control background = Dali::Toolkit::Control::New(); |
| 121 | background.SetAnchorPoint( Dali::AnchorPoint::CENTER ); | 124 | background.SetAnchorPoint( Dali::AnchorPoint::CENTER ); |
examples/text-field/text-field-example.cpp
| @@ -75,6 +75,9 @@ public: | @@ -75,6 +75,9 @@ public: | ||
| 75 | stage.SetBackgroundColor( Vector4( 0.04f, 0.345f, 0.392f, 1.0f ) ); | 75 | stage.SetBackgroundColor( Vector4( 0.04f, 0.345f, 0.392f, 1.0f ) ); |
| 76 | stage.KeyEventSignal().Connect(this, &TextFieldExample::OnKeyEvent); | 76 | stage.KeyEventSignal().Connect(this, &TextFieldExample::OnKeyEvent); |
| 77 | 77 | ||
| 78 | + // Hide the indicator bar | ||
| 79 | + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); | ||
| 80 | + | ||
| 78 | mButton = CreateFolderButton(); | 81 | mButton = CreateFolderButton(); |
| 79 | mButton.ClickedSignal().Connect( this, &TextFieldExample::OnButtonClicked ); | 82 | mButton.ClickedSignal().Connect( this, &TextFieldExample::OnButtonClicked ); |
| 80 | stage.Add( mButton ); | 83 | stage.Add( mButton ); |
examples/tilt/tilt-example.cpp
| @@ -59,6 +59,9 @@ public: | @@ -59,6 +59,9 @@ public: | ||
| 59 | stage.GetRootLayer().TouchSignal().Connect( this, &TiltController::OnTouch ); | 59 | stage.GetRootLayer().TouchSignal().Connect( this, &TiltController::OnTouch ); |
| 60 | 60 | ||
| 61 | CreateSensor(); | 61 | CreateSensor(); |
| 62 | + | ||
| 63 | + // Connect signals to allow Back and Escape to exit. | ||
| 64 | + stage.KeyEventSignal().Connect( this, &TiltController::OnKeyEvent ); | ||
| 62 | } | 65 | } |
| 63 | 66 | ||
| 64 | void CreateSensor() | 67 | void CreateSensor() |
| @@ -88,6 +91,21 @@ public: | @@ -88,6 +91,21 @@ public: | ||
| 88 | mTextLabel.RotateBy(pitchRot);; | 91 | mTextLabel.RotateBy(pitchRot);; |
| 89 | } | 92 | } |
| 90 | 93 | ||
| 94 | + /** | ||
| 95 | + * @brief OnKeyEvent signal handler. | ||
| 96 | + * @param[in] event The key event information | ||
| 97 | + */ | ||
| 98 | + void OnKeyEvent( const KeyEvent& event ) | ||
| 99 | + { | ||
| 100 | + if( event.state == KeyEvent::Down ) | ||
| 101 | + { | ||
| 102 | + if ( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) ) | ||
| 103 | + { | ||
| 104 | + mApplication.Quit(); | ||
| 105 | + } | ||
| 106 | + } | ||
| 107 | + } | ||
| 108 | + | ||
| 91 | private: | 109 | private: |
| 92 | Application& mApplication; | 110 | Application& mApplication; |
| 93 | TiltSensor mTiltSensor; | 111 | TiltSensor mTiltSensor; |
shared/view.h
| @@ -118,6 +118,9 @@ Dali::Layer CreateView( Dali::Application& application, | @@ -118,6 +118,9 @@ Dali::Layer CreateView( Dali::Application& application, | ||
| 118 | { | 118 | { |
| 119 | Dali::Stage stage = Dali::Stage::GetCurrent(); | 119 | Dali::Stage stage = Dali::Stage::GetCurrent(); |
| 120 | 120 | ||
| 121 | + // Hide the indicator bar | ||
| 122 | + application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); | ||
| 123 | + | ||
| 121 | // Create default View. | 124 | // Create default View. |
| 122 | view = Dali::Toolkit::Control::New(); | 125 | view = Dali::Toolkit::Control::New(); |
| 123 | view.SetAnchorPoint( Dali::AnchorPoint::CENTER ); | 126 | view.SetAnchorPoint( Dali::AnchorPoint::CENTER ); |