*/
#include <dali-toolkit/dali-toolkit.h>
-#include <dali/public-api/object/property-map.h>
#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
-#include <dali-toolkit/public-api/controls/slider/slider.h>
using namespace Dali;
using namespace Dali::Toolkit;
{
DEMO_IMAGE_DIR "sphere-button.png",
DEMO_IMAGE_DIR "cone-button.png",
- DEMO_IMAGE_DIR "conical-frustrum-button.png",
+ DEMO_IMAGE_DIR "conical-frustum-button.png",
DEMO_IMAGE_DIR "cylinder-button.png",
DEMO_IMAGE_DIR "cube-button.png",
DEMO_IMAGE_DIR "bevelled-cube-button.png",
//Visual map for model
mVisualMap.Clear();
- mVisualMap[ Visual::Property::TYPE ] = Visual::PRIMITIVE;
+ mVisualMap[ Toolkit::Visual::Property::TYPE ] = Visual::PRIMITIVE;
mVisualMap[ PrimitiveVisual::Property::MIX_COLOR ] = mColor;
+ mVisualMap[ Visual::Property::TRANSFORM ] =
+ Property::Map().Add( Visual::Transform::Property::ORIGIN, Align::CENTER )
+ .Add( Visual::Transform::Property::ANCHOR_POINT, Align::CENTER );
}
//Sets the 3D model to a sphere and modifies the sliders appropriately.
mShapeTitle.SetProperty( TextLabel::Property::TEXT, SHAPE_TITLE_PREFIX + "Cone" );
}
- //Sets the 3D model to a conical frustrum and modifies the sliders appropriately.
- void LoadConicalFrustrum()
+ //Sets the 3D model to a conical frustum and modifies the sliders appropriately.
+ void LoadConicalFrustum()
{
InitialiseSlidersAndModel();
//Set up specific visual properties.
- mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CONICAL_FRUSTRUM;
+ mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CONICAL_FRUSTUM;
mVisualMap[ PrimitiveVisual::Property::SCALE_TOP_RADIUS ] = DEFAULT_SCALE_TOP_RADIUS;
mVisualMap[ PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS ] = DEFAULT_SCALE_BOTTOM_RADIUS;
mVisualMap[ PrimitiveVisual::Property::SCALE_HEIGHT ] = DEFAULT_SCALE_HEIGHT;
mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
//Update title.
- mShapeTitle.SetProperty( TextLabel::Property::TEXT, SHAPE_TITLE_PREFIX + "Conical Frustrum" );
+ mShapeTitle.SetProperty( TextLabel::Property::TEXT, SHAPE_TITLE_PREFIX + "Conical Frustum" );
}
//Sets the 3D model to a cylinder and modifies the sliders appropriately.
}
case 2:
{
- LoadConicalFrustrum();
+ LoadConicalFrustum();
break;
}
case 3:
Vector2 mRotation; ///< Keeps track of model rotation.
};
-void RunTest( Application& application )
+int DALI_EXPORT_API main( int argc, char **argv )
{
+ Application application = Application::New( &argc, &argv );
PrimitiveShapesController test( application );
-
application.MainLoop();
-}
-
-// Entry point for Linux & Tizen applications
-//
-int main( int argc, char **argv )
-{
- Application application = Application::New( &argc, &argv );
-
- RunTest( application );
-
return 0;
}