| Line 64... |
Line 64... |
| 64 |
void CustomiseTurret::UpdateCockpits()
|
64 |
void CustomiseTurret::UpdateCockpits()
|
| 65 |
{
|
65 |
{
|
| 66 |
this->ComboCockpitStd->Items->Clear();
|
66 |
this->ComboCockpitStd->Items->Clear();
|
| 67 |
|
67 |
|
| 68 |
CGameDirectories *gameDir = ((CustomiseShip ^)m_pParent)->gameDirectories();
|
68 |
CGameDirectories *gameDir = ((CustomiseShip ^)m_pParent)->gameDirectories();
|
| 69 |
for(Utils::String cockpit = gameDir->firstCockpit(); !cockpit.empty(); cockpit = gameDir->nextCockpit()) {
|
69 |
for(Utils::WString cockpit = gameDir->firstCockpit(); !cockpit.empty(); cockpit = gameDir->nextCockpit()) {
|
| 70 |
this->ComboCockpitStd->Items->Add(_US(cockpit));
|
70 |
this->ComboCockpitStd->Items->Add(_US(cockpit));
|
| 71 |
}
|
71 |
}
|
| 72 |
|
72 |
|
| 73 |
this->ComboCockpitCustom->Items->Clear();
|
73 |
this->ComboCockpitCustom->Items->Clear();
|
| 74 |
for ( SCockpit *c = m_pShipFile->GetCockpits()->First(); c; c = m_pShipFile->GetCockpits()->Next() )
|
74 |
for ( SCockpit *c = m_pShipFile->GetCockpits()->First(); c; c = m_pShipFile->GetCockpits()->Next() )
|
| Line 171... |
Line 171... |
| 171 |
|
171 |
|
| 172 |
if ( this->ComboGameCockpit->SelectedIndex > 0 )
|
172 |
if ( this->ComboGameCockpit->SelectedIndex > 0 )
|
| 173 |
{
|
173 |
{
|
| 174 |
CGameDirectories *gameDir = ((CustomiseShip ^)m_pParent)->gameDirectories();
|
174 |
CGameDirectories *gameDir = ((CustomiseShip ^)m_pParent)->gameDirectories();
|
| 175 |
gameDir->setSelectedGameDirectory(this->ComboGameCockpit->SelectedIndex, true);
|
175 |
gameDir->setSelectedGameDirectory(this->ComboGameCockpit->SelectedIndex, true);
|
| 176 |
for ( std::pair<Utils::String, Utils::String> laser = gameDir->firstLaser(); !laser.first.empty(); laser = gameDir->nextLaser() ) {
|
176 |
for ( std::pair<Utils::WString, Utils::WString> laser = gameDir->firstLaser(); !laser.first.empty(); laser = gameDir->nextLaser() ) {
|
| 177 |
Utils::String group = laser.first.token(";", 6);
|
177 |
Utils::WString group = laser.first.token(L";", 6);
|
| 178 |
SStringList *found = List.FindString(group);
|
178 |
SStringList *found = List.FindString(group.toString());
|
| 179 |
if ( found ) {
|
179 |
if ( found ) {
|
| 180 |
found->data += ", ";
|
180 |
found->data += ", ";
|
| 181 |
found->data += laser.second;
|
181 |
found->data += laser.second.toString();
|
| 182 |
}
|
182 |
}
|
| 183 |
else
|
183 |
else
|
| 184 |
List.PushBack(CyString(group), CyString(laser.second));
|
184 |
List.PushBack(CyString(group.toString()), CyString(laser.second.toString()));
|
| 185 |
}
|
185 |
}
|
| 186 |
gameDir->reselectTemporaryDirectory();
|
186 |
gameDir->reselectTemporaryDirectory();
|
| 187 |
}
|
187 |
}
|
| 188 |
|
188 |
|
| 189 |
for ( int i = 0; i < 32; i++ )
|
189 |
for ( int i = 0; i < 32; i++ )
|