//============================== // OvrSliderComponent::OvrSliderComponent OvrSliderComponent::OvrSliderComponent( VRMenu & menu, float const sliderFrac, Vector3f const & localSlideDelta, float const minValue, float const maxValue, float const sensitivityScale, VRMenuId_t const rootId, VRMenuId_t const scrubberId, VRMenuId_t const textId, VRMenuId_t const bubbleId, VRMenuId_t const fillId ) : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_TOUCH_DOWN ) | VRMENU_EVENT_TOUCH_UP | VRMENU_EVENT_TOUCH_RELATIVE | VRMENU_EVENT_INIT | VRMENU_EVENT_FRAME_UPDATE ) , TouchDown( false ) , SliderFrac( sliderFrac ) , MinValue( minValue ) , MaxValue( maxValue ) , SensitivityScale( sensitivityScale ) , LocalSlideDelta( localSlideDelta ) , Menu( menu ) , RootId( rootId ) , ScrubberId( scrubberId ) , TextId( textId ) , BubbleId( bubbleId ) , FillId( fillId ) , CaretBasePose() , BubbleFader( 0.0f ) , BubbleFadeOutTime( -1.0 ) , LastDot( 0.0f ) , OnReleaseFunction( NULL ) , OnReleaseObject( NULL ) { }
//============================== // MoviePosterComponent:: MoviePosterComponent::MoviePosterComponent() : CarouselItemComponent( VRMenuEventFlags_t() ), CurrentItem( NULL ), Poster( NULL ), PosterImage( NULL ), Is3DIcon( NULL ), Shadow( NULL ) { }
ControlsGazeTimer::ControlsGazeTimer() : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_FRAME_UPDATE ) | VRMENU_EVENT_FOCUS_GAINED | VRMENU_EVENT_FOCUS_LOST ), LastGazeTime( 0 ), HasFocus( false ) { }
//============================== // OvrTextFade_Component::OvrTextFade_Component OvrTextFade_Component::OvrTextFade_Component( Vector3f const & iconBaseOffset, Vector3f const & iconFadeOffset ) : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_FRAME_UPDATE ) | VRMENU_EVENT_FOCUS_GAINED | VRMENU_EVENT_FOCUS_LOST ), TextAlphaFader( 0.0f ), StartFadeInTime( -1.0 ), StartFadeOutTime( -1.0 ), IconOffsetFader( 0.0f ), IconBaseOffset( iconBaseOffset ), IconFadeOffset( iconFadeOffset ) { }
//============================== // MovieSelectionComponent:: MovieSelectionComponent::MovieSelectionComponent( SelectionView *view ) : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_FRAME_UPDATE ) | VRMENU_EVENT_TOUCH_DOWN | VRMENU_EVENT_TOUCH_UP | VRMENU_EVENT_FOCUS_GAINED | VRMENU_EVENT_FOCUS_LOST ), CallbackView( view ) { }
UIDiscreteSliderComponent::UIDiscreteSliderComponent( UIDiscreteSlider & discreteSlider, unsigned int startValue ) : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_TOUCH_DOWN ) | VRMENU_EVENT_TOUCH_UP | VRMENU_EVENT_FOCUS_GAINED | VRMENU_EVENT_FOCUS_LOST ) , DiscreteSlider( discreteSlider ) , CurrentValue( startValue ) { }
UICellComponent::UICellComponent( UIDiscreteSliderComponent & sliderComponent, unsigned int val ) : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_TOUCH_UP ) | VRMENU_EVENT_FOCUS_GAINED | VRMENU_EVENT_FOCUS_LOST ) , SliderComponent( sliderComponent ) , Value( val ) , OnClickFunction( &UIDiscreteSliderComponent::OnCellSelect ) , OnFocusGainedFunction( &UIDiscreteSliderComponent::OnCellFocusOn ) , OnFocusLostFunction( &UIDiscreteSliderComponent::OnCellFocusOff ) { }
//============================== // TheaterSelectionComponent:: TheaterSelectionComponent::TheaterSelectionComponent( TheaterSelectionView *view ) : CarouselItemComponent( VRMenuEventFlags_t( VRMENU_EVENT_TOUCH_DOWN ) | VRMENU_EVENT_TOUCH_UP | VRMENU_EVENT_FOCUS_GAINED | VRMENU_EVENT_FOCUS_LOST | VRMENU_EVENT_FRAME_UPDATE ), CallbackView( view ), HilightFader( 0.0f ), StartFadeInTime( 0.0 ), StartFadeOutTime( 0.0 ), HilightScale( 1.05f ), FadeDuration( 0.25f ) { }
//============================== // SwipeHintComponent::SwipeHintComponent() SwipeHintComponent::SwipeHintComponent( CarouselBrowserComponent *carousel, const bool isRightSwipe, const float totalTime, const float timeOffset, const float delay ) : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_FRAME_UPDATE ) | VRMENU_EVENT_OPENING ), Carousel( carousel ), IsRightSwipe( isRightSwipe ), TotalTime( totalTime ), TimeOffset( timeOffset ), Delay( delay ), StartTime( 0 ), ShouldShow( false ), IgnoreDelay( false ), TotalAlpha() { }
//============================== // ResumeMovieComponent:: ResumeMovieComponent::ResumeMovieComponent( ResumeMovieView * view, int itemNum ) : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_TOUCH_DOWN ) | VRMENU_EVENT_TOUCH_UP | VRMENU_EVENT_FOCUS_GAINED | VRMENU_EVENT_FOCUS_LOST | VRMENU_EVENT_FRAME_UPDATE ), Icon( NULL ), Sound(), HasFocus( false ), ItemNum( itemNum ), CallbackView( view ) { }
//============================== // OvrTextFade_Component::OnEvent_Impl eMsgStatus OvrTextFade_Component::OnEvent_Impl( App * app, VrFrame const & vrFrame, OvrVRMenuMgr & menuMgr, VRMenuObject * self, VRMenuEvent const & event ) { OVR_ASSERT( HandlesEvent( VRMenuEventFlags_t( event.EventType ) ) ); switch ( event.EventType ) { case VRMENU_EVENT_FRAME_UPDATE: return Frame( app, vrFrame, menuMgr, self, event ); case VRMENU_EVENT_FOCUS_GAINED: return FocusGained( app, vrFrame, menuMgr, self, event ); case VRMENU_EVENT_FOCUS_LOST: return FocusLost( app, vrFrame, menuMgr, self, event ); default: OVR_ASSERT( !"Event flags mismatch!" ); // the constructor is specifying a flag that's not handled return MSG_STATUS_ALIVE; } }
ScrubBarComponent::ScrubBarComponent() : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_TOUCH_DOWN ) | VRMENU_EVENT_TOUCH_DOWN | VRMENU_EVENT_FRAME_UPDATE | VRMENU_EVENT_FOCUS_GAINED | VRMENU_EVENT_FOCUS_LOST ), HasFocus( false ), TouchDown( false ), Progress( 0.0f ), Duration( 0 ), Background( NULL ), ScrubBar( NULL ), CurrentTime( NULL ), SeekTime( NULL ), OnClickFunction( NULL ), OnClickObject( NULL ) { }
//============================== // OvrDefaultComponent:: OvrDefaultComponent::OvrDefaultComponent( Vector3f const & hilightOffset, float const hilightScale, float const fadeDuration, float const fadeDelay, Vector4f const & textNormalColor, Vector4f const & textHilightColor ) : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_TOUCH_DOWN ) | VRMENU_EVENT_TOUCH_UP | VRMENU_EVENT_FOCUS_GAINED | VRMENU_EVENT_FOCUS_LOST | VRMENU_EVENT_FRAME_UPDATE ), HilightFader( 0.0f ), StartFadeInTime( -1.0 ), StartFadeOutTime( -1.0 ), HilightOffset( hilightOffset ), HilightScale( hilightScale ), FadeDuration( fadeDuration ), FadeDelay( fadeDelay ), TextNormalColor( textNormalColor ), TextHilightColor( textHilightColor ), SuppressText( false ) { }
//============================== // OvrScrollBarComponent::OvrScrollBarComponent OvrScrollBarComponent::OvrScrollBarComponent( const VRMenuId_t rootId, const VRMenuId_t baseId, const VRMenuId_t thumbId, const int startElementIndex, const int numElements ) : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_FRAME_UPDATE ) ) , Fader( 0.0f ) , FadeInRate( 1.0f / 0.2f ) , FadeOutRate( 1.0f / 0.5f ) , NumOfItems( 0 ) , ScrollBarBaseWidth( 0.0f ) , ScrollBarBaseHeight( 0.0f ) , ScrollBarCurrentbaseLength( 0.0f ) , ScrollBarThumbWidth( 0.0f ) , ScrollBarThumbHeight( 0.0f ) , ScrollBarCurrentThumbLength( 0.0f ) , ScrollRootId( rootId ) , ScrollBarBaseId( baseId ) , ScrollBarThumbId( thumbId ) , CurrentScrollState( SCROLL_STATE_HIDDEN ) , IsVertical( false ) { }
//============================== // VRMenuEventHandler::DispatchToComponents bool VRMenuEventHandler::DispatchToComponents( OvrGuiSys & guiSys, VrFrame const & vrFrame, VRMenuEvent const & event, VRMenuObject * receiver ) const { ASSERT_WITH_TAG( receiver != NULL, "VrMenu" ); Array< VRMenuComponent* > const & list = receiver->GetComponentList(); int numComps = list.GetSizeI(); for ( int i = 0; i < numComps; ++i ) { VRMenuComponent * item = list[i]; if ( item->HandlesEvent( VRMenuEventFlags_t( event.EventType ) ) ) { LogEventType( event, "DispatchEvent: to '%s'", receiver->GetText().ToCStr() ); if ( item->OnEvent( guiSys, vrFrame, receiver, event ) == MSG_STATUS_CONSUMED ) { LogEventType( event, "DispatchEvent: receiver '%s', component %i consumed event.", receiver->GetText().ToCStr(), i ); return true; // consumed by component } } } return false; }
OvrVideoMenuRootComponent( OvrVideoMenu & videoMenu ) : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_FRAME_UPDATE ) | VRMENU_EVENT_OPENING ) , VideoMenu( videoMenu ) , CurrentVideo( NULL ) { }
OvrPanoMenuRootComponent( OvrPanoMenu & panoMenu ) : VRMenuComponent( VRMenuEventFlags_t( VRMENU_EVENT_FRAME_UPDATE ) | VRMENU_EVENT_OPENING ) , PanoMenu( panoMenu ) , CurrentPano( NULL ) { }