* The soldier names can change * after going into other screens. */
| 128 | * after going into other screens. |
| 129 | */ |
| 130 | void CraftsState::init() |
| 131 | { |
| 132 | State::init(); |
| 133 | _lstCrafts->clearList(); |
| 134 | for (std::vector<Craft*>::iterator i = _base->getCrafts()->begin(); i != _base->getCrafts()->end(); ++i) |
| 135 | { |
| 136 | std::wostringstream ss, ss2, ss3; |
| 137 | ss << (*i)->getNumWeapons() << "/" << (*i)->getRules()->getWeapons(); |
| 138 | ss2 << (*i)->getNumSoldiers(); |
| 139 | ss3 << (*i)->getNumVehicles(); |
| 140 | _lstCrafts->addRow(5, (*i)->getName(_game->getLanguage()).c_str(), tr((*i)->getStatus()).c_str(), ss.str().c_str(), ss2.str().c_str(), ss3.str().c_str()); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | /** |
| 145 | * Returns to the previous screen. |
nothing calls this directly
no test coverage detected