void CloudsHUDController::populateQuestion(const string& question, bool forceOn, bool animate){ // cout << "setting text with current value " << question << " " << hudLabelMap["QuestionTextBox"]->getText() << endl; // EZ: Commented this out because populateQuestion should only be called when hover starts // Otherwise it wouldn't work if hovering over the same question twice. // if( ofToUpper(hudLabelMap["QuestionTextBox"]->getText()) == ofToUpper(question) ){ // return; // } // else if(question == ""){ animateOff( CLOUDS_HUD_QUESTION ); } else{ //JG HACK specific question //Is it possible to truly simulate reality? //What makes a satisfying interaction //How does the network accelerate creativity? //question = "Is it possible to truly simulate reality?"; //JG END HACK hudLabelMap["QuestionTextBox"]->setText( question, forceOn ); if( forceOn ){ if(animate){ animateOn( CLOUDS_HUD_QUESTION ); } else{ hudLabelMap["QuestionTextBox"]->instantIn(); } } } }
void MediaInterface::updateServer(const ds::UpdateParams& p){ ds::ui::Sprite::updateServer(p); if(mIdling != isIdling()){ mIdling = isIdling(); if(mIdling){ animateOff(); } else { animateOn(); } } }
void StoryView::onAppEvent(const ds::Event& in_e){ if(in_e.mWhat == IdleEndedEvent::WHAT()){ const IdleEndedEvent& e((const IdleEndedEvent&)in_e); animateOn(); } else if(in_e.mWhat == IdleStartedEvent::WHAT()){ animateOff(); } // If you have an event that is dispatched when new content is queryied, you could map that here. //if(in_e.mWhat == StoryContentUpdated::WHAT()){ // setData(); //} }
void CloudsHUDController::respondToClip(CloudsClip* clip){ // cout << "ID's on clip " << clip.name << " and fcp id? " << clip.fcpFileId << endl; // cout << "Clip is " << clip.getLinkName() << endl; // cout << "speaker: " << speaker.firstName << " " << speaker.lastName << endl; #ifdef KINECT_INPUT // EZ: No lower third in Kinect version // JG: adding it back // return; #endif //LOWER THIRD //update lower third, but only if the speaker has changed if(speaker.fcpID != CloudsSpeaker::speakers[ clip->person ].fcpID){ speaker = CloudsSpeaker::speakers[ clip->person ]; populateLowerThird(speaker.firstName, speaker.lastName, speaker.location2, speaker.title, speaker.byline1, false ); if (bVisualSystemDisplayed) { // cue up the lower third until the visual system is done bLowerThirdCued = true; cuedClipEndTime = ofGetElapsedTimef() + clip->getDuration(); } else { // display the lower third right away animateOn(CLOUDS_HUD_LOWER_THIRD); } } // PROJECT EXAMPLE #ifndef OCULUS_RIFT if(clip->hasProjectExample && clip->projectExample.exampleVideos.size() ){ CloudsProjectExample example = clip->projectExample; string videoPath = example.exampleVideos[ (int)ofRandom(0, example.exampleVideos.size()) ]; populateProjectExample( videoPath, example.creatorName, "", example.title, true ); } else{ animateOff(CLOUDS_HUD_PROJECT_EXAMPLE); } #endif }
void CloudsHUDController::update(){ //HACK TO KEEP QUESTION ON after asked if(hudLabelMap["QuestionTextBox"]->getText() != "" && !hudLabelMap["QuestionTextBox"]->isVisible()){ hudLabelMap["QuestionTextBox"]->animateIn(); } // cout << "CURRENT QUESTION " << hudLabelMap["QuestionTextBox"]->getText() << " VISIBLE? " << (hudLabelMap["QuestionTextBox"]->isVisible() ? "YES" : "NO") << endl; for(int i = 0; i < allLayers.size(); i++){ allLayers[i]->update(); } float xScale = ofGetWindowWidth()/hudBounds.width; float yScale = ofGetWindowHeight()/hudBounds.height; scaleAmt = (xScale < yScale) ? xScale : yScale; home.hudScale = scaleAmt; home.update(); if( videoPlayer.isPlaying() ){ if( videoPlayer.isFrameNew() ){ bSkipAVideoFrame = false; videoBounds.set(0, 0, videoPlayer.getWidth(), videoPlayer.getHeight() ); videoBounds.scaleTo( svgVideoBounds ); } videoPlayer.update(); } if( home.wasHomeOpened() ){ if( !bIsHudOpen ){ animateOn( CLOUDS_HUD_FULL ); }else{ animateOff(); } } }
void CloudsHUDController::actEnded(CloudsActEventArgs& args){ animateOff( CLOUDS_HUD_FULL ); }
void CloudsHUDController::questionHoverOff(){ animateOff( CLOUDS_HUD_QUESTION ); }
void CloudsHUDController::topicChanged(CloudsTopicEventArgs& args){ if(!bActJustStarted){ animateOff( CLOUDS_HUD_QUESTION ); } bActJustStarted = false; }