OpenTTD Source
20241108-master-g80f628063a
|
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 |
Enumerations | |
enum | SignListHotkeys { SLHK_FOCUS_FILTER_BOX } |
Enum referring to the Hotkeys in the sign list window. More... | |
Functions | |
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 constexpr 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, &SignListWindow::hotkeys) |
static constexpr NWidgetPart | _nested_query_sign_edit_widgets [] |
static WindowDesc | _query_sign_edit_desc (WDP_CENTER, nullptr, 0, 0, WC_QUERY_STRING, WC_NONE, WDF_CONSTRUCTION, _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 136 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 585 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 556 of file signs_gui.cpp.
References _ctrl_pressed, _local_company, CompanyCanRenameSign(), and OWNER_DEITY.
|
static |
Actually rename the sign.
index | the sign to rename. |
text | the new name. |
Definition at line 403 of file signs_gui.cpp.
References StrEmpty().
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 573 of file signs_gui.cpp.
References CloseWindowByClass(), and WC_QUERY_STRING.
Window* ShowSignList | ( | ) |
Open the sign list window.
Definition at line 392 of file signs_gui.cpp.
|
staticconstexpr |
Definition at line 526 of file signs_gui.cpp.
|
staticconstexpr |
Definition at line 352 of file signs_gui.cpp.