- DevelControl::DoAction( imageView, ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::PAUSE, Property::Value() );
+ bool OnPlayButtonClicked(Button button)
+ {
+ unsigned int controlIndex = GetControlIndex(button);
+
+ ImageView imageView = mImageViews[controlIndex];
+
+ Property::Map map = imageView.GetProperty<Property::Map>(ImageView::Property::IMAGE);
+ Property::Value* value = map.Find(DevelImageVisual::Property::PLAY_STATE);
+
+ if(value)
+ {
+ if(value->Get<int>() != static_cast<int>(DevelImageVisual::PlayState::PLAYING))
+ {
+ mPlayButtons[controlIndex].SetProperty(Button::Property::LABEL, "Pause");
+
+ DevelControl::DoAction(imageView, ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::PLAY, Property::Value());
+ }
+ else
+ {
+ mPlayButtons[controlIndex].SetProperty(Button::Property::LABEL, "Play");
+
+ DevelControl::DoAction(imageView, ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::PAUSE, Property::Value());
+ }