void AddBotDialog::ReloadAIList() { try { m_ais = lslTowxArrayString(LSL::usync().GetAIList(m_battle.GetHostGameName())); } catch (...) { } m_ai->Clear(); for (unsigned int i = 0; i < m_ais.GetCount(); i++) m_ai->Append(RefineAIName(m_ais[i])); if (m_ais.GetCount() > 0) { m_ai->SetStringSelection(sett().GetLastAI()); if (m_ai->GetStringSelection() == wxEmptyString) m_ai->SetSelection(0); } else { customMessageBox(SL_MAIN_ICON, _("No AI bots found in your Spring installation."), _("No bot-libs found"), wxOK); } m_add_btn->Enable(m_ai->GetStringSelection() != wxEmptyString); ShowAIInfo(); ShowAIOptions(); }
void AddBotDialog::OnSelectBot( wxCommandEvent& /*unused*/ ) { ShowAIInfo(); ShowAIOptions(); }