// The Init signal is received once (only) during the Application lifetime
void Create( Application& application )
{
- // Get a handle to the stage
- Stage stage = Stage::GetCurrent();
- stage.SetBackgroundColor( Color::WHITE );
+ // Get a handle to the window
+ Window window = application.GetWindow();
+ window.SetBackgroundColor( Color::WHITE );
//Set up layer to place UI on.
Layer layer = Layer::New();
layer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
layer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI ); //We use a 2D layer as this is closer to UI work than full 3D scene creation.
layer.SetProperty( Layer::Property::DEPTH_TEST, true ); //Enable depth testing, as otherwise the 2D layer would not do so.
- stage.Add( layer );
+ window.Add( layer );
//Set up model selection buttons.
SetupButtons( layer );
SetupModel( layer );
//Allow for exiting of the application via key presses.
- stage.KeyEventSignal().Connect( this, &PrimitiveShapesController::OnKeyEvent );
+ window.KeyEventSignal().Connect( this, &PrimitiveShapesController::OnKeyEvent );
}
//Place buttons on the top of the screen, which allow for selection of the shape to be displayed.
}
}
- //Adds a control to the centre of the stage to display the 3D shapes.
+ //Adds a control to the centre of the window to display the 3D shapes.
//The model is placed in the center of the screen, like so:
//
// +--------------------------------+
//If escape or the back button is pressed, quit the application (and return to the launcher)
void OnKeyEvent( const KeyEvent& event )
{
- if( event.state == KeyEvent::Down )
+ if( event.GetState() == KeyEvent::Down )
{
if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) )
{