OpenTTD Source: src/signs_func.h File Reference

OpenTTD Source 13.2.1

Functions
signs_func.h File Reference
`#include "signs_type.h"`
`#include "tile_type.h"`

Go to the source code of this file.

## Functions
void | UpdateAllSignVirtCoords ()
| Update the coordinates of all signs.
void | PlaceProc_Sign (TileIndex tile)
| PlaceProc function, called when someone pressed the button if the sign-tool is selected. More...
bool | CompanyCanRenameSign (const Sign *si)
| Check if the current company can rename a given sign. More...
void | ShowRenameSignWindow (const Sign *si)
| Show the window to change the text of a sign. More...
void | HandleClickOnSign (const Sign *si)
| Handle clicking on a sign. More...
void | DeleteRenameSignWindow (SignID sign)
| Close the sign window associated with the given sign. More...
Window * | ShowSignList ()
| Open the sign list window. More...

## Detailed Description

Functions related to signs.

Definition in file signs_func.h.

## Function Documentation

## ◆ CompanyCanRenameSign()

bool CompanyCanRenameSign | ( | const Sign * | si | ) |

Check if the current company can rename a given sign.

Parameters

  *si | The sign in question.

Returns
  true if the sign can be renamed, else false.

Definition at line 71 of file signs.cpp.

References _current_company, and OWNER_DEITY.

Referenced by CmdRenameSign(), and HandleClickOnSign().

## ◆ DeleteRenameSignWindow()

void DeleteRenameSignWindow | ( | SignID | sign | ) |

Close the sign window associated with the given sign.

Parameters

  sign | The sign to close the window for.

Definition at line 596 of file signs_gui.cpp.

References Window::Close(), FindWindowById(), WC_QUERY_STRING, and WN_QUERY_STRING_SIGN.

Referenced by Sign::~Sign().

## ◆ HandleClickOnSign()

void HandleClickOnSign | ( | const Sign * | si | ) |

Handle clicking on a sign.

Parameters

  si | The sign that was clicked on.

Definition at line 567 of file signs_gui.cpp.

References _ctrl_pressed, _local_company, CompanyCanRenameSign(), and OWNER_DEITY.

## ◆ PlaceProc_Sign()

void PlaceProc_Sign | ( | TileIndex | tile | ) |

PlaceProc function, called when someone pressed the button if the sign-tool is selected.

Parameters

  tile | on which to place the sign

Definition at line 123 of file signs_cmd.cpp.

References CcPlaceSign().

Referenced by TerraformToolbarWindow::OnPlaceObject().

## ◆ ShowRenameSignWindow()

void ShowRenameSignWindow | ( | const Sign * | si | ) |

Show the window to change the text of a sign.

Parameters

  si | The sign to show the window for.

Definition at line 584 of file signs_gui.cpp.

References CloseWindowByClass(), and WC_QUERY_STRING.

## ◆ ShowSignList()

Window* ShowSignList | ( |  | ) |

Open the sign list window.

Returns
  newly opened sign list window, or nullptr if the window could not be opened.

Definition at line 403 of file signs_gui.cpp.