equal
deleted
inserted
replaced
58 config = new GameUIConfig(this); |
58 config = new GameUIConfig(this); |
59 |
59 |
60 QStringList teamslist = config->GetTeamsList(); |
60 QStringList teamslist = config->GetTeamsList(); |
61 |
61 |
62 if(teamslist.empty()) { |
62 if(teamslist.empty()) { |
63 HWTeam defaultTeam("DefaultTeam", config); |
63 HWTeam defaultTeam("DefaultTeam"); |
64 defaultTeam.SaveToFile(); |
64 defaultTeam.SaveToFile(); |
65 teamslist.push_back("DefaultTeam"); |
65 teamslist.push_back("DefaultTeam"); |
66 } |
66 } |
67 |
67 |
68 for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) |
68 for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) |
150 ui.Pages->setCurrentIndex(ID_PAGE_NETCHAT); |
150 ui.Pages->setCurrentIndex(ID_PAGE_NETCHAT); |
151 } |
151 } |
152 |
152 |
153 void HWForm::NewTeam() |
153 void HWForm::NewTeam() |
154 { |
154 { |
155 tmpTeam = new HWTeam("unnamed", config); |
155 tmpTeam = new HWTeam("unnamed"); |
156 |
156 |
157 ui.Pages->setCurrentIndex(ID_PAGE_SETUP_TEAM); |
157 ui.Pages->setCurrentIndex(ID_PAGE_SETUP_TEAM); |
158 } |
158 } |
159 |
159 |
160 void HWForm::EditTeam() |
160 void HWForm::EditTeam() |
161 { |
161 { |
162 tmpTeam = new HWTeam(ui.pageOptions->CBTeamName->currentText(), config); |
162 tmpTeam = new HWTeam(ui.pageOptions->CBTeamName->currentText()); |
163 tmpTeam->LoadFromFile(); |
163 tmpTeam->LoadFromFile(); |
164 tmpTeam->SetToPage(this); |
164 tmpTeam->SetToPage(this); |
165 ui.Pages->setCurrentIndex(ID_PAGE_SETUP_TEAM); |
165 ui.Pages->setCurrentIndex(ID_PAGE_SETUP_TEAM); |
166 } |
166 } |
167 |
167 |
236 hwnet->JoinGame("#hw"); |
236 hwnet->JoinGame("#hw"); |
237 } |
237 } |
238 |
238 |
239 void HWForm::NetAddTeam() |
239 void HWForm::NetAddTeam() |
240 { |
240 { |
241 HWTeam team("DefaultTeam", config); |
241 HWTeam team("DefaultTeam"); |
242 team.LoadFromFile(); |
242 team.LoadFromFile(); |
243 hwnet->AddTeam(team); |
243 hwnet->AddTeam(team); |
244 } |
244 } |
245 |
245 |
246 void HWForm::NetStartGame() |
246 void HWForm::NetStartGame() |