const unsigned int IMAGE_HEIGHT = 256;
const unsigned int NUM_IMAGE_PER_ROW_IN_ATLAS = 8;
-AlphaFunction ALPHA_FUNCTIONS[] = { AlphaFunctions::Linear,
- AlphaFunctions::EaseIn,
- AlphaFunctions::EaseOut };
+AlphaFunction ALPHA_FUNCTIONS[] = { AlphaFunction(AlphaFunction::LINEAR),
+ AlphaFunction(AlphaFunction::EASE_IN),
+ AlphaFunction(AlphaFunction::EASE_OUT) };
const unsigned int NUM_ALPHA_FUNCTIONS = sizeof(ALPHA_FUNCTIONS) / sizeof(AlphaFunction);
TOOLBAR_IMAGE,
"" );
- mView.OrientationAnimationStartedSignal().Connect( this, &ItemViewExample::OnOrientationChanged );
+ app.GetWindow().GetOrientation().ChangedSignal().Connect( this, &ItemViewExample::OnOrientationChanged );
// Create an edit mode button. (left of toolbar)
Toolkit::PushButton editButton = Toolkit::PushButton::New();
// Create the item view actor
mImageAtlas = CreateImageAtlas();
mItemView = ItemView::New(*this);
- mItemView.SetRelayoutEnabled( false );
mItemView.SetParentOrigin(ParentOrigin::CENTER);
mItemView.SetAnchorPoint(AnchorPoint::CENTER);
* Orientation changed signal callback
* @param orientation
*/
- void OnOrientationChanged( View view, Animation& animation, const Orientation& orientation )
+ void OnOrientationChanged( Orientation orientation )
{
const unsigned int angle = orientation.GetDegrees();
// Add a checkbox child actor; invisible until edit-mode is enabled
ImageActor checkbox = ImageActor::New( mWhiteImage );
- checkbox.SetRelayoutEnabled( false );
checkbox.SetName( "CheckBox" );
checkbox.SetColor( Vector4(0.0f,0.0f,0.0f,0.6f) );
checkbox.SetParentOrigin( ParentOrigin::TOP_RIGHT );
actor.Add( checkbox );
ImageActor tick = ImageActor::New( ResourceImage::New(SELECTED_IMAGE) );
- tick.SetRelayoutEnabled( false );
tick.SetColorMode( USE_OWN_COLOR );
tick.SetName( "Tick" );
tick.SetParentOrigin( ParentOrigin::TOP_RIGHT );
slider.Add( text );
Actor textContainer = Actor::New();
- textContainer.SetRelayoutEnabled( true );
textContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
mAlphaFunctionText = TextLabel::New( ALPHA_FUNCTIONS_TEXT[mAlphaFuncIndex] );
mAlphaFunctionText.SetAnchorPoint( ParentOrigin::CENTER );
text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y );
textContainer.Add( text );
- mMenu.MarkDirtyForRelayout();
mMenu.Show();
mMenuShown = true;
}
Mode mMode;
bool mMenuShown;
- Toolkit::View mView;
+ Toolkit::Control mView;
unsigned int mOrientation;
Toolkit::ToolBar mToolBar;