Exemplo n.º 1
0
void BattleListTab::AddBattle(IBattle& battle)
{
	if (battle.GetGUIListActiv() || (m_filter->GetActiv() && !m_filter->FilterBattle(battle))) {
		return;
	}
	m_battle_list->AddBattle(battle);
	battle.SetGUIListActiv(true);
	SetNumDisplayed();
}
Exemplo n.º 2
0
void BattleListTab::OnFilterActiv(wxCommandEvent& /*unused*/)
{
	bool active = m_filter_activ->GetValue();
	if (!ui().IsConnected()) {
		m_filter_activ->SetValue(!active);
		return;
	}
	m_filter->SetActiv(active);
	cfg().Write(_T( "/BattleFilter/Active" ), active);
	SetNumDisplayed();
}
Exemplo n.º 3
0
void BattleListTab::RemoveBattle(IBattle& battle)
{
	if (&battle == m_sel_battle) {
		SelectBattle(0);
	}

	m_battle_list->RemoveBattle(battle);

	battle.SetGUIListActiv(false);
	SetNumDisplayed();
}
Exemplo n.º 4
0
void BattleListTab::OnFilterActiv( wxCommandEvent& /*unused*/ )
{
	bool active = m_filter_activ->GetValue();
	if ( !ui().IsConnected() )
	{
		m_filter_activ->SetValue( !active );
		return;
	}
	m_filter->SetActiv( active );
	sett().SetBattleFilterActivState( active );
	SetNumDisplayed();
}
Exemplo n.º 5
0
void BattleListTab::RemoveAllBattles()
{
	SelectBattle( 0 );
	serverSelector().GetServer().battles_iter->IteratorBegin();
	while ( ! serverSelector().GetServer().battles_iter->EOL() )
	{
		IBattle* temp_battle = serverSelector().GetServer().battles_iter->GetBattle();
		if ( temp_battle != 0 )
			temp_battle->SetGUIListActiv( false );
	}
	m_battle_list->Clear();
	SetNumDisplayed();
}
Exemplo n.º 6
0
void BattleListTab::RemoveAllBattles()
{
	SelectBattle(0);
	m_battle_list->Clear();
	SetNumDisplayed();
}