|
OpenTTD Source
1.10.0-RC1
|
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 "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 |
Enumerations | |
| enum | SignListHotkeys { SLHK_FOCUS_FILTER_BOX } |
| Enum referring to the Hotkeys in the sign list window. More... | |
Functions | |
| static EventState | SignListGlobalHotkeys (int hotkey) |
| Handler for global hotkeys of the SignListWindow. More... | |
| Window * | ShowSignList () |
| Open the sign list window. More... | |
| static bool | RenameSign (SignID index, const char *text) |
| Actually rename the sign. More... | |
| void | HandleClickOnSign (const Sign *si) |
| Handle clicking on a sign. More... | |
| void | ShowRenameSignWindow (const Sign *si) |
| Show the window to change the text of a sign. More... | |
| void | DeleteRenameSignWindow (SignID sign) |
| Close the sign window associated with the given sign. More... | |
Variables | |
| static Hotkey | signlist_hotkeys [] |
| static const NWidgetPart | _nested_sign_list_widgets [] |
| static WindowDesc | _sign_list_desc (WDP_AUTO, "list_signs", 358, 138, WC_SIGN_LIST, WC_NONE, 0, _nested_sign_list_widgets, lengthof(_nested_sign_list_widgets), &SignListWindow::hotkeys) |
| static const NWidgetPart | _nested_query_sign_edit_widgets [] |
| static WindowDesc | _query_sign_edit_desc (WDP_CENTER, "query_sign", 0, 0, WC_QUERY_STRING, WC_NONE, WDF_CONSTRUCTION, _nested_query_sign_edit_widgets, lengthof(_nested_query_sign_edit_widgets)) |
The GUI for signs.
Definition in file signs_gui.cpp.
| enum SignListHotkeys |
Enum referring to the Hotkeys in the sign list window.
| Enumerator | |
|---|---|
| SLHK_FOCUS_FILTER_BOX | Focus the edit box for editing the filter string. |
Definition at line 137 of 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 581 of file signs_gui.cpp.
References 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 556 of file signs_gui.cpp.
References _ctrl_pressed, _local_company, and OWNER_DEITY.
|
static |
Actually rename the sign.
| index | the sign to rename. |
| text | the new name. |
Definition at line 415 of file signs_gui.cpp.
References CMD_MSG, CMD_RENAME_SIGN, DoCommandP(), and StrEmpty().
Referenced by 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 569 of file signs_gui.cpp.
References DeleteWindowByClass(), and WC_QUERY_STRING.
Referenced by CcPlaceSign().
| Window* ShowSignList | ( | ) |
Open the sign list window.
Definition at line 404 of file signs_gui.cpp.
|
static |
Handler for global hotkeys of the SignListWindow.
| hotkey | Hotkey |
Definition at line 348 of file signs_gui.cpp.
|
static |
Definition at line 527 of file signs_gui.cpp.
|
static |
Definition at line 362 of file signs_gui.cpp.
|
static |
Definition at line 356 of file signs_gui.cpp.