示例#1
0
void CHUDState::Exit(void)
{
	UpdateSelected();
	m_pTM->ReleaseTexture(m_nMiniMapBkgID);
	m_pTM->ReleaseTexture(m_nIconID);
	m_pTM->ReleaseTexture(m_nHUDID);
}
示例#2
0
void t_File::SetSelection()
{
  // set Selection
  for (int id=0;id<4;id++)
    {
      // ClearSelection
      for (int j=0;j<myProject.NumberOfNames(id);j++)
	{
	  int WhichOne=(int)Lists[id]->GetClientData(j);
	  int Selected=Lists[id]->Selected(j);
	  myProject.SetIDNameSelect(id,WhichOne,Selected);
	}
    }
  // Select Data
  myProject.Select();
  UpdateSelected();
}
示例#3
0
void GameState::HandleEvents(sf::Event theEvent)
{
  // Exit program if Escape key is pressed
#if (SFML_VERSION_MAJOR < 2)
  if((theEvent.Type == sf::Event::KeyReleased) && (theEvent.Key.Code == sf::Key::Escape))
#else
    if((theEvent.type == sf::Event::KeyReleased) && (theEvent.key.code == sf::Keyboard::Escape))
#endif
    {
      // Signal the application to exit
      mApp.Quit(GQE::StatusAppOK);
    }

  // Update selected edge if mouse moved
#if (SFML_VERSION_MAJOR < 2)
  if(theEvent.Type == sf::Event::MouseMoved)
#else
    if(theEvent.type == sf::Event::MouseMoved)
#endif
    {
      UpdateSelected(theEvent);
    }

#if (SFML_VERSION_MAJOR < 2)
  if(theEvent.Type == sf::Event::MouseButtonReleased)
#else
    if(theEvent.type == sf::Event::MouseButtonReleased)
#endif
    {
      // If current player is 0 then the last game ended, start a new game
      if(0 == mCurrentPlayer)
      {
        // Reinitialize the board and start a new game
        ReInit();
      }
      else
      {
        // Player has selected an edge
        SelectEdge();
      }
    }
}
示例#4
0
void t_File::UpdateDisplay(int)
{
  char tmp[256];

  // write Filename
  myString name=myProject.GetTSFileName();
  if (name=="")
    {
      name=TIME_NODATA;
    }
  DataFile->SetValue(name.chars());

  // write selected points
  UpdateSelected();
  
  // write total Points
  sprintf(tmp,"%i",myProject.GetTotalPoints());
  Total->SetLabel(tmp);

  // check Reverse scale
  ReverseScale->SetValue(myProject.GetReverseScale());

  // 
  wxMenuBar *menu=((wxFrame*)GetGrandParent())->GetMenuBar();
  menu->Check(M_TIMESTRING_NAME_WEIGHT,myProject.GetUseNameWeight());
  menu->Check(M_TIMESTRING_POINT_WEIGHT,myProject.GetUsePointWeight());

  // now set the lists
  int i;
  for (i=0;i<4;i++)
    {
      // fill the lists
      FillList(Lists[i],i);
      // set the label
      Label[i]->SetLabel(myProject.NameSet(i).chars());
    }

}