X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Frefraction-effect%2Frefraction-effect-example.cpp;h=ad10428c8a17305fb676da203e882123654c893b;hb=a53991ba7f9b6104908f6b67bfc04deabd6cb3a3;hp=4d67a279c1ddf1cda68c8c2694a128bfe514890b;hpb=e63be8c3fd711bc370c89c4a5760fe638d57dffa;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/refraction-effect/refraction-effect-example.cpp b/examples/refraction-effect/refraction-effect-example.cpp old mode 100644 new mode 100755 index 4d67a27..ad10428 --- a/examples/refraction-effect/refraction-effect-example.cpp +++ b/examples/refraction-effect/refraction-effect-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,8 @@ // EXTERNAL INCLUDES #include -#include #include +#include #include #include @@ -260,8 +260,8 @@ private: // Add a button to change background. (right of toolbar) mChangeTextureButton = Toolkit::PushButton::New(); - mChangeTextureButton.SetUnselectedImage( CHANGE_TEXTURE_ICON ); - mChangeTextureButton.SetSelectedImage( CHANGE_TEXTURE_ICON_SELECTED ); + mChangeTextureButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, CHANGE_TEXTURE_ICON ); + mChangeTextureButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, CHANGE_TEXTURE_ICON_SELECTED ); mChangeTextureButton.ClickedSignal().Connect( this, &RefractionEffectExample::OnChangeTexture ); toolBar.AddControl( mChangeTextureButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, @@ -269,8 +269,8 @@ private: DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); // Add a button to change mesh pattern. ( left of bar ) mChangeMeshButton = Toolkit::PushButton::New(); - mChangeMeshButton.SetUnselectedImage( CHANGE_MESH_ICON ); - mChangeMeshButton.SetSelectedImage( CHANGE_MESH_ICON_SELECTED ); + mChangeMeshButton.SetProperty( Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, CHANGE_MESH_ICON ); + mChangeMeshButton.SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, CHANGE_MESH_ICON_SELECTED ); mChangeMeshButton.ClickedSignal().Connect( this, &RefractionEffectExample::OnChangeMesh ); toolBar.AddControl( mChangeMeshButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, @@ -509,7 +509,9 @@ private: } std::istringstream iss(line.substr(2), std::istringstream::in); - unsigned int indices[ numOfInt ]; + + std::vector indices( numOfInt ); + unsigned int i=0; while( iss >> indices[i++] && i < numOfInt); unsigned int step = (i+1) / 3; @@ -588,20 +590,10 @@ private: /*****************************************************************************/ -static void -RunTest(Application& app) -{ - RefractionEffectExample theApp(app); - app.MainLoop(); -} - -/*****************************************************************************/ - int DALI_EXPORT_API main(int argc, char **argv) { Application app = Application::New(&argc, &argv, DEMO_THEME_PATH); - - RunTest(app); - + RefractionEffectExample theApp(app); + app.MainLoop(); return 0; }