void ResumeMovieView::SetPosition( OvrVRMenuMgr & menuMgr, const Vector3f &pos ) { menuHandle_t centerRootHandle = Menu->HandleForId( menuMgr, ID_CENTER_ROOT ); VRMenuObject * centerRoot = menuMgr.ToObject( centerRootHandle ); OVR_ASSERT( centerRoot != NULL ); Posef pose = centerRoot->GetLocalPose(); pose.Position = pos; centerRoot->SetLocalPose( pose ); }
//============================== // OvrSliderComponent::OnInit eMsgStatus OvrSliderComponent::OnInit( App * app, VrFrame const & vrFrame, OvrVRMenuMgr & menuMgr, VRMenuObject * self, VRMenuEvent const & event ) { // find the starting offset of the caret LOG( "OvrSliderComponent - VRMENU_EVENT_INIT" ); VRMenuObject * caret = menuMgr.ToObject( self->ChildHandleForId( menuMgr, ScrubberId ) ); if ( caret != NULL ) { CaretBasePose = caret->GetLocalPose(); } SetCaretPoseFromFrac( menuMgr, self, SliderFrac ); UpdateText( menuMgr, self, BubbleId ); return MSG_STATUS_ALIVE; }
//============================== // OvrSliderComponent::OnInit eMsgStatus OvrSliderComponent::OnInit( OvrGuiSys & guiSys, VrFrame const & vrFrame, VRMenuObject * self, VRMenuEvent const & event ) { OVR_UNUSED( vrFrame ); OVR_UNUSED( event ); // find the starting offset of the caret //LOG( "OvrSliderComponent - VRMENU_EVENT_INIT" ); VRMenuObject * caret = guiSys.GetVRMenuMgr().ToObject( self->ChildHandleForId( guiSys.GetVRMenuMgr(), ScrubberId ) ); if ( caret != NULL ) { CaretBasePose = caret->GetLocalPose(); } SetCaretPoseFromFrac( guiSys.GetVRMenuMgr(), self, SliderFrac ); UpdateText( guiSys.GetVRMenuMgr(), self, BubbleId ); return MSG_STATUS_ALIVE; }