//---------------------------------------------------------------------------
void TSingleLogFrame::afterLogContact()
{
   // callback
   updateTrees();
   afterSelectEntry( 0 );
   NextContactDetailsTimerTimer( this );
}
Beispiel #2
0
void Map::update(const sf::Time& elapsed_time, uint score)
{
  // How many pixels of moving
  float move = elapsed_time.asMilliseconds() * _speed;

  // Move backgrounds
  for(sf::Sprite& background : _backgrounds)
  {
    background.move(-move, 0);
    if(background.getPosition().x < -_width )
      background.move(_width * 2, 0);
  }

  // Move clouds
  for( sf::Sprite& cloud : _clouds )
  {
    cloud.move(-move, 0);
    if(cloud.getPosition().x < -cloud.getGlobalBounds().width)
      positionCloud(cloud, _width);
  }

  // Move bird
  if( score > _bird_score_limit )
  {
     _bird.move(-move * _bird_speed_modificator, 0);

     // Bird goes out of screen, randomly re-place it
     const static float bird_screen_limit = - _bird.getGlobalBounds().width;
     if( _bird.getPosition().x < bird_screen_limit )
       placeBird();
  }
  std::cout << _bird.getPosition().x << std::endl;
  // Take care of trees (move and generate)
  updateTrees(move, score);
}
Beispiel #3
0
StatusType iDroid::UpdateDownloads(int groupBase, int multiplyFactor) {
	if (groupBase < 1 || multiplyFactor <= 0)
		return INVALID_INPUT;

	updateTrees(groupBase, multiplyFactor, _appsByIDtree, _appsByDLtree);
	_max = getMax(_appsByDLtree);

	for (List<Version>::Iterator it = _versions.begin(); it != _versions.end();
			++it) {
		updateTrees(groupBase, multiplyFactor, it->_appsByIDtree,
				it->_appsByDLtree);
		it->_max = getMax(it->_appsByDLtree);
	}

	return SUCCESS;
}
Beispiel #4
0
MythMenu* NetTree::createShowManageMenu()
{
    QString label = tr("Subscription Management");

    MythMenu *menu = new MythMenu(label, this, "options");


    menu->AddItem(tr("Update Site Maps"), SLOT(updateTrees()));
    menu->AddItem(tr("Update RSS"), SLOT(updateRSS()));
    menu->AddItem(tr("Manage Site Subscriptions"), SLOT(runTreeEditor()));
    menu->AddItem(tr("Manage RSS Subscriptions"), SLOT(runRSSEditor()));
    if (!m_treeAutoUpdate)
        menu->AddItem(tr("Enable Automatic Site Updates"), SLOT(toggleTreeUpdates()));
    else
        menu->AddItem(tr("Disable Automatic Site Updates"), SLOT(toggleTreeUpdates()));
//    if (!m_rssAutoUpdate)
//        menu->AddItem(tr("Enable Automatic RSS Updates"), SLOT(toggleRSSUpdates()));
//    else
//        menu->AddItem(tr("Disable Automatic RSS Updates"), SLOT(toggleRSSUpdates()));

    return menu;
}