* Returns to the previous screen. * @param action Pointer to an action. */
| 146 | * @param action Pointer to an action. |
| 147 | */ |
| 148 | void CraftsState::btnOkClick(Action *) |
| 149 | { |
| 150 | _game->popState(); |
| 151 | |
| 152 | if (_game->getSavedGame()->getMonthsPassed() > -1 && Options::storageLimitsEnforced && _base->storesOverfull()) |
| 153 | { |
| 154 | _game->pushState(new SellState(_game, _base)); |
| 155 | _game->pushState(new ErrorMessageState(_game, tr("STR_STORAGE_EXCEEDED").arg(_base->getName()).c_str(), _palette, Palette::blockOffset(15)+1, "BACK01.SCR", 0)); |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | /** |
| 160 | * Shows the selected craft's info. |
nothing calls this directly
no test coverage detected