* Go to the Place Access Lift screen. * @param action Pointer to an action. */
| 111 | * @param action Pointer to an action. |
| 112 | */ |
| 113 | void ConfirmNewBaseState::btnOkClick(Action *) |
| 114 | { |
| 115 | if (_game->getSavedGame()->getFunds() >= _cost) |
| 116 | { |
| 117 | _game->getSavedGame()->setFunds(_game->getSavedGame()->getFunds() - _cost); |
| 118 | _game->getSavedGame()->getBases()->push_back(_base); |
| 119 | _game->pushState(new BaseNameState(_game, _base, _globe, false)); |
| 120 | } |
| 121 | else |
| 122 | { |
| 123 | _game->pushState(new ErrorMessageState(_game, "STR_NOT_ENOUGH_MONEY", _palette, Palette::blockOffset(8)+10, "BACK01.SCR", 0)); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Returns to the previous screen. |
nothing calls this directly
no test coverage detected