Esempio n. 1
0
void VDebugOptions::SetFrameRateVisible(bool bVisible)
{
  m_bFpsVisible = bVisible;

  VAppMenu* pMainMenu = GetParent()->GetAppModule<VAppMenu>();
  if (pMainMenu != NULL)
  {
    pMainMenu->SetItemCheckState("Toggle FPS Display", m_bFpsVisible);
  }
}
Esempio n. 2
0
void VDebugOptions::SetWireframe(bool bWireframe)
{  
  Vision::Renderer.SetWireframeMode(bWireframe);

  VAppMenu* pMainMenu = GetParent()->GetAppModule<VAppMenu>();
  if (pMainMenu != NULL)
  {
    pMainMenu->SetItemCheckState("Wireframe", bWireframe);
  }
}
void VDebugProfiling::OnActionTriggered(int iIndex)
{
  VAppMenu* pMainMenu = GetParent()->GetAppModule<VAppMenu>();
  const VProfilingNodeCollection& pages = Vision::Profiling.GetProfilingRootNode()->Children();

  // deselect old menu item
  if (m_iCurrentProfilingPage != -1)
  {
    if (pMainMenu!=NULL)
      pMainMenu->SetItemCheckState(pages.GetAt(m_iCurrentProfilingPage)->GetName(), false);
  }

  if (iIndex == s_iResetMaxValuesAction)
  {
    Vision::Profiling.ResetProfilingMaxValues();
  }
  else
  {
    if (iIndex == -1 || Vision::Profiling.IsPageVisible(iIndex))
    {
      Vision::Profiling.Hide();
      m_iCurrentProfilingPage = -1;
    }
    else
    {
      Vision::Profiling.SetPage(iIndex);
      m_iCurrentProfilingPage = iIndex;
    }
  }

  // select new menu item
  if (m_iCurrentProfilingPage != -1)
  {
    if (pMainMenu!=NULL)
      pMainMenu->SetItemCheckState(pages.GetAt(m_iCurrentProfilingPage)->GetName(), true);
  }
}