* Updates the base name and disables the OK button * if no name is entered. * @param action Pointer to an action. */
| 100 | * @param action Pointer to an action. |
| 101 | */ |
| 102 | void BaseNameState::edtNameChange(Action *action) |
| 103 | { |
| 104 | _base->setName(_edtName->getText()); |
| 105 | if (action->getDetails()->key.keysym.sym == SDLK_RETURN || |
| 106 | action->getDetails()->key.keysym.sym == SDLK_KP_ENTER) |
| 107 | { |
| 108 | if (!_edtName->getText().empty()) |
| 109 | { |
| 110 | btnOkClick(action); |
| 111 | } |
| 112 | } |
| 113 | else |
| 114 | { |
| 115 | _btnOk->setVisible(!_edtName->getText().empty()); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Returns to the previous screen |
nothing calls this directly
no test coverage detected