Пример #1
0
void OvrVideoMenu::OnItemEvent_Impl( App * app, VRMenuId_t const itemId, VRMenuEvent const & event )
{
	const double now = ovr_GetTimeInSeconds();
	if ( ButtonCoolDown <= 0.0f && (now - OpenTime > 0.5))
	{
		ButtonCoolDown = BUTTON_COOL_DOWN_SECONDS;

		if ( itemId.Get() == ID_BROWSER_BUTTON.Get() )
		{
			Videos->SetMenuState( Oculus360Videos::MENU_BROWSER );
		}
		else if ( itemId.Get( ) == ID_VIDEO_BUTTON.Get( ) )
		{
			Videos->SeekTo( 0 );
		}
	}
}
Пример #2
0
void OvrPanoMenu::OnItemEvent_Impl( App * app, VRMenuId_t const itemId, VRMenuEvent const & event )
{
	if ( ButtonCoolDown <= 0.0f )
	{
		ButtonCoolDown = BUTTON_COOL_DOWN_SECONDS;

		if ( Photos->AllowPanoInput() )
		{
			if ( itemId.Get() == ID_BROWSER_BUTTON.Get() )
			{
				Photos->SetMenuState( Oculus360Photos::MENU_BROWSER );
			}
			else if ( itemId.Get() == ID_FAVORITES_BUTTON.Get() )
			{
				const TagAction actionTaken = static_cast< TagAction >( Photos->ToggleCurrentAsFavorite() );
				const bool forceShowSwipeIndicators = ( actionTaken == TAG_REMOVED ) && ( Photos->GetNumPanosInActiveCategory() == 1 );
				UpdateButtonsState( Photos->GetActivePano( ), forceShowSwipeIndicators );
			}
		}
	}
}
Пример #3
0
void OvrVideoMenu::OnItemEvent_Impl( OvrGuiSys & guiSys, ovrFrameInput const & vrFrame, 
		VRMenuId_t const itemId, VRMenuEvent const & event )
{
	OVR_UNUSED( vrFrame );
	OVR_UNUSED( event );

	const double now = vrapi_GetTimeInSeconds();
	if ( ButtonCoolDown <= 0.0f && (now - OpenTime > 0.5))
	{
		ButtonCoolDown = BUTTON_COOL_DOWN_SECONDS;

		Oculus360Videos * videos = static_cast< Oculus360Videos* >( guiSys.GetApp()->GetAppInterface() );
		if ( itemId.Get() == ID_BROWSER_BUTTON.Get() )
		{
			videos->SetMenuState( Oculus360Videos::MENU_BROWSER );
		}
		else if ( itemId.Get( ) == ID_VIDEO_BUTTON.Get( ) )
		{
			videos->SeekTo( 0 );
		}
	}
}
Пример #4
0
//==============================
// OvrSliderComponent::UpdateText
void OvrSliderComponent::UpdateText( OvrVRMenuMgr & menuMgr, VRMenuObject * self, VRMenuId_t const id )
{
	if ( !id.IsValid() )
	{
		return;
	}

	VRMenuObject * obj = menuMgr.ToObject( self->ChildHandleForId( menuMgr, id ) );
	if ( obj != NULL )
	{
		char valueStr[127];
		GetStringValue( valueStr, sizeof( valueStr ) );
		obj->SetText( valueStr );
	}
}