|
OpenTTD Source 20251116-master-g21329071df
|
The GUI for signs. More...
#include "stdafx.h"#include "company_gui.h"#include "company_func.h"#include "signs_base.h"#include "signs_func.h"#include "debug.h"#include "command_func.h"#include "strings_func.h"#include "window_func.h"#include "map_func.h"#include "viewport_func.h"#include "querystring_gui.h"#include "sortlist_type.h"#include "stringfilter_type.h"#include "string_func.h"#include "core/geometry_func.hpp"#include "hotkeys.h"#include "transparency.h"#include "gui.h"#include "signs_cmd.h"#include "timer/timer.h"#include "timer/timer_window.h"#include "widgets/sign_widget.h"#include "table/strings.h"#include "table/sprites.h"#include "safeguards.h"Go to the source code of this file.
Data Structures | |
| struct | SignList |
| struct | SignListWindow |
| struct | SignWindow |
Functions | |
| Window * | ShowSignList () |
| Open the sign list window. | |
| static bool | RenameSign (SignID index, std::string_view text) |
| Actually rename the sign. | |
| void | HandleClickOnSign (const Sign *si) |
| Handle clicking on a sign. | |
| void | ShowRenameSignWindow (const Sign *si) |
| Show the window to change the text of a sign. | |
| void | DeleteRenameSignWindow (SignID sign) |
| Close the sign window associated with the given sign. | |
Variables | |
| static constexpr std::initializer_list< NWidgetPart > | _nested_sign_list_widgets |
| static WindowDesc | _sign_list_desc (WDP_AUTO, "list_signs", 358, 138, WC_SIGN_LIST, WC_NONE, {}, _nested_sign_list_widgets, &SignListWindow::hotkeys) |
| static constexpr std::initializer_list< NWidgetPart > | _nested_query_sign_edit_widgets |
| static WindowDesc | _query_sign_edit_desc (WDP_CENTER, {}, 0, 0, WC_QUERY_STRING, WC_NONE, WindowDefaultFlag::Construction, _nested_query_sign_edit_widgets) |
The GUI for signs.
Definition in file signs_gui.cpp.
| void DeleteRenameSignWindow | ( | SignID | sign | ) |
Close the sign window associated with the given sign.
| sign | The sign to close the window for. |
Definition at line 566 of file signs_gui.cpp.
References Window::Close(), FindWindowById(), WC_QUERY_STRING, and WN_QUERY_STRING_SIGN.
Referenced by Sign::~Sign().
| void HandleClickOnSign | ( | const Sign * | si | ) |
Handle clicking on a sign.
| si | The sign that was clicked on. |
Definition at line 537 of file signs_gui.cpp.
References _ctrl_pressed, _local_company, CompanyCanRenameSign(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, OWNER_DEITY, RenameSign(), and ShowRenameSignWindow().
|
static |
Actually rename the sign.
| index | the sign to rename. |
| text | the new name. |
Definition at line 383 of file signs_gui.cpp.
Referenced by HandleClickOnSign(), and SignWindow::OnClick().
| void ShowRenameSignWindow | ( | const Sign * | si | ) |
Show the window to change the text of a sign.
| si | The sign to show the window for. |
Definition at line 554 of file signs_gui.cpp.
References CloseWindowByClass(), and WC_QUERY_STRING.
Referenced by CcPlaceSign(), and HandleClickOnSign().
| Window * ShowSignList | ( | ) |
Open the sign list window.
Definition at line 372 of file signs_gui.cpp.
Referenced by MenuClickMap(), MainToolbarWindow::OnHotkey(), and SignListWindow::SignListGlobalHotkeys().
|
staticconstexpr |
Definition at line 507 of file signs_gui.cpp.
|
staticconstexpr |
Definition at line 332 of file signs_gui.cpp.