const unsigned int IMAGE_THUMBNAIL_WIDTH = 256; ///< Width of Thumbnail Image in texels
const unsigned int IMAGE_THUMBNAIL_HEIGHT = 256; ///< Height of Thumbnail Image in texels
-const float SPIN_DURATION = 5.0f; ///< Times to spin an Image by upon touching, each spin taking a second.
+const float SPIN_DURATION = 1.0f; ///< Times to spin an Image by upon touching, each spin taking a second.
const float EFFECT_SNAP_DURATION(0.66f); ///< Scroll Snap Duration for Effects
const float EFFECT_FLICK_DURATION(0.5f); ///< Scroll Flick Duration for Effects
*/
void OnInit(Application& app)
{
+ DemoHelper::RequestThemeChange();
+
Stage stage = Dali::Stage::GetCurrent();
stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
{
// Spin the Image a few times.
Animation animation = Animation::New(SPIN_DURATION);
- animation.RotateBy( actor, Degree(360.0f * SPIN_DURATION), Vector3::XAXIS, AlphaFunctions::EaseOut);
+ animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f * SPIN_DURATION) ), Vector3::XAXIS ), AlphaFunctions::EaseOut );
animation.Play();
}
}
{
if(!mTitleActor)
{
- mTitleActor = TextView::New();
+ mTitleActor = DemoHelper::CreateToolBarLabel( "" );
// Add title to the tool bar.
mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Alignment::HorizontalCenter );
}
- Font font = Font::New();
- mTitleActor.SetText( title );
- mTitleActor.SetSize( font.MeasureText( title ) );
- mTitleActor.SetStyleToCurrentText(DemoHelper::GetDefaultTextStyle());
+ mTitleActor.SetProperty( Toolkit::TextLabel::Property::TEXT, title );
}
/**
Application& mApplication; ///< Application instance
Toolkit::View mView; ///< The View instance.
Toolkit::ToolBar mToolBar; ///< The View's Toolbar.
- TextView mTitleActor; ///< The Toolbar's Title.
+ TextLabel mTitleActor; ///< The Toolbar's Title.
Layer mContentLayer; ///< The content layer (contains game actors)
ScrollView mScrollView; ///< ScrollView UI Component
bool mScrolling; ///< ScrollView scrolling state (true = scrolling, false = stationary)