Exemplo n.º 1
0
void CChildFrame::OnUpdateKeyY(CCmdUI* pCmdUI) 
{
  CWorldEditorDoc* pDoc = theApp.GetActiveDocument();
  if( pDoc->GetEditingMode() == TERRAIN_MODE)
  {
    pCmdUI->SetCheck(TRUE);
  }
  else
  {
    OnUpdateViewFromEntity(pCmdUI);
  }
}
Exemplo n.º 2
0
void CChildFrame::OnKeyY() 
{
  CWorldEditorDoc* pDoc = theApp.GetActiveDocument();
  if( pDoc->GetEditingMode() == TERRAIN_MODE)
  {
    theApp.m_iTerrainBrushMode=TBM_CONTINOUS_NOISE;
    theApp.m_ctTerrainPageCanvas.MarkChanged();
    pDoc->SetStatusLineModeInfoMessage();
    return;
  }
  else
  {
    OnViewFromEntity();
  }
}
BOOL CTriangularisationCombo::OnIdle(LONG lCount)
{
  // get document ptr
  CWorldEditorDoc* pDoc = theApp.GetActiveDocument();

  if( (pDoc == NULL) ||
      (pDoc->GetEditingMode() != CSG_MODE) ||
      (!pDoc->m_bPrimitiveMode) )
  {
    // we should disable triangularisation combo
    if(GetCount() == 1) return TRUE; // we allready have "not available" in combo
    // remove all combo entries
    ResetContent();
    // set none available message
    AddString( L"None Available");
    SetCurSel( 0);
  }
  // we should enable triangularisation combo 
  else
  {
    // if it is allready enabled
    if(GetCount() != 1) return TRUE;
    ResetContent();
    // add all possible triangularisation types
    AddString( L"None");
    AddString( L"Center");
    AddString( L"Vertex 1");
    AddString( L"Vertex 2");
    AddString( L"Vertex 3");
    AddString( L"Vertex 4");
    AddString( L"Vertex 5");
    AddString( L"Vertex 6");
    AddString( L"Vertex 7");
    AddString( L"Vertex 8");
    AddString( L"Vertex 9");
    AddString( L"Vertex 10");
    AddString( L"Vertex 11");
    AddString( L"Vertex 12");
    AddString( L"Vertex 13");
    AddString( L"Vertex 14");
    AddString( L"Vertex 15");
    AddString( L"Vertex 16");
    // select currently selected triangularisation type
    SetCurSel( (int)theApp.m_vfpCurrent.vfp_ttTriangularisationType);
  }
  return TRUE;
}