MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / RenameSign

Function RenameSign

src/signs_gui.cpp:384–389  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

382 * @return true if the window will already be removed after returning.
383 */
384static 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.

Callers 3

OnClickMethod · 0.85
OnPlaceObjectMethod · 0.85
HandleClickOnSignFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected