stage.SetBackgroundColor( Color::WHITE );
Vector2 stageSize = stage.GetSize();
- stage.GetRootLayer().SetDepthTestDisabled(true);
+ stage.GetRootLayer().SetProperty( Layer::Property::DEPTH_TEST, false );
mSize = Vector3( stageSize.x / mColumnsPerPage, stageSize.y / mRowsPerPage, 0.0f );
// Create a Spiral Layout and add it to the Item View.
mItemView.AddLayout( * DefaultItemLayout::New( DefaultItemLayout::SPIRAL ) );
- stage.GetRootLayer().SetBehavior( Layer::LAYER_3D ); // The item-view spiral layout requires Layer 3D behaviour.
+ stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); // The item-view spiral layout requires Layer 3D behaviour.
// Calculate the size we would like our item-view layout to be, and then activate the layout.
const Vector2 stageSize = stage.GetSize();
// Creates a default view with a default tool bar, the view is added to the stage.
mContent = DemoHelper::CreateView( application, mView, mToolBar, "", TOOLBAR_IMAGE, "" );
- mContent.SetBehavior( Layer::LAYER_3D );
+ mContent.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
// Add an effect changing toggle button
// Grab stage, configure layer
Stage stage = Stage::GetCurrent();
auto rootLayer = stage.GetRootLayer();
- rootLayer.SetBehavior(Layer::LAYER_3D);
+ rootLayer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
auto stageSize = stage.GetSize();
auto stageHalfSize = stageSize * .5f;
{
Stage stage = Dali::Stage::GetCurrent();
stage.KeyEventSignal().Connect(this, &FlexContainerExample::OnKeyEvent);
- stage.GetRootLayer().SetBehavior(Layer::LAYER_3D);
+ stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR,Layer::LAYER_3D );
Vector2 stageSize = Stage::GetCurrent().GetSize();
mStage.SetBackgroundColor( Color::BLACK );
// Use 3D layer
- mStage.GetRootLayer().SetBehavior( Layer::LAYER_3D );
+ mStage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
// Load game scene
mScene.Load( SCENE_URL );
{
Stage stage = Dali::Stage::GetCurrent();
stage.KeyEventSignal().Connect(this, &ItemViewExample::OnKeyEvent);
- stage.GetRootLayer().SetBehavior(Layer::LAYER_3D);
+ stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
Vector2 stageSize = Stage::GetCurrent().GetSize();
// Display item view on the stage
stage.Add( mItemView );
- stage.GetRootLayer().SetBehavior( Layer::LAYER_3D );
+ stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
// Create the layouts
mSpiralLayout = DefaultItemLayout::New( DefaultItemLayout::SPIRAL );
case SPIRAL_LAYOUT:
case DEPTH_LAYOUT:
{
- stage.GetRootLayer().SetBehavior(Layer::LAYER_3D);
+ stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
break;
}
case GRID_LAYOUT:
{
- stage.GetRootLayer().SetBehavior(Layer::LAYER_UI);
+ stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI );
break;
}
}
stage.SetBackgroundColor( Color::WHITE );
Vector2 stageSize = stage.GetSize();
- stage.GetRootLayer().SetDepthTestDisabled(true);
+ stage.GetRootLayer().SetProperty( Layer::Property::DEPTH_TEST, false );
mSize = Vector3( stageSize.x / mColumnsPerPage, stageSize.y / mRowsPerPage, 0.0f );
void CreateAnimatingScene()
{
mSceneActor = Layer::New();
- mSceneActor.SetBehavior( Layer::LAYER_3D );
+ mSceneActor.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
mSceneActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
// Create and add images to the scene actor:
layer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
layer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- layer.SetBehavior( Layer::LAYER_UI ); //We use a 2D layer as this is closer to UI work than full 3D scene creation.
- layer.SetDepthTestDisabled( false ); //Enable depth testing, as otherwise the 2D layer would not do so.
+ 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 );
//Set up model selection buttons.
mLayer3D.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mLayer3D.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mLayer3D.SetBehavior( Layer::LAYER_3D );
- mLayer3D.SetDepthTestDisabled( false );
+ mLayer3D.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
+ mLayer3D.SetProperty( Layer::Property::DEPTH_TEST, true );
auto gltf = glTF(DEMO_GAME_DIR "/reflection");
layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
// Set the parent origin to a small percentage below the center (so the demo will scale for different resolutions).
layer.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.58f, 0.5f ) );
- layer.SetBehavior( Layer::LAYER_UI );
- layer.SetDepthTestDisabled( false );
+ layer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI );
+ layer.SetProperty( Layer::Property::DEPTH_TEST, true );
stage.Add( layer );
// Main cube:
// Setup
mView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) );
- mContents.SetBehavior(Layer::LAYER_3D);
+ mContents.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
mContents.SetProperty( Actor::Property::POSITION, mTranslation );
mContents.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) );
mContents.SetProperty( Actor::Property::SCALE, Vector3( mPinchScale, mPinchScale, mPinchScale ) );