* Actually rename the sign. * @param index the sign to rename. * @param text the new name. * @return true if the window will already be removed after returning. */
| 382 | * @return true if the window will already be removed after returning. |
| 383 | */ |
| 384 | static bool RenameSign(SignID index, std::string_view text) |
| 385 | { |
| 386 | bool remove = text.empty(); |
| 387 | Command<CMD_RENAME_SIGN>::Post(remove ? STR_ERROR_CAN_T_DELETE_SIGN : STR_ERROR_CAN_T_CHANGE_SIGN_NAME, index, std::string{text}); |
| 388 | return remove; |
| 389 | } |
| 390 | |
| 391 | /** |
| 392 | * Actually move the sign. |
no test coverage detected