|
OpenTTD Source 20260206-master-g4d4e37dbf1
|
The data of the error message. More...
#include <error.h>
Public Member Functions | |
| ErrorMessageData (EncodedString &&summary_msg, EncodedString &&detailed_msg, bool is_critical=false, int x=0, int y=0, EncodedString &&extra_msg={}, CompanyID company=CompanyID::Invalid()) | |
| Display an error message in a window. | |
| bool | HasFace () const |
| Check whether error window shall display a company manager face. | |
Protected Attributes | |
| bool | is_critical |
| Whether the error message is critical. | |
| EncodedString | summary_msg |
| General error message showed in first line. Must be valid. | |
| EncodedString | detailed_msg |
| Detailed error message showed in second line. Can be INVALID_STRING_ID. | |
| EncodedString | extra_msg |
| Extra error message shown in third line. Can be INVALID_STRING_ID. | |
| Point | position |
| Position of the error message window. | |
| CompanyID | company |
| Company belonging to the face being shown. CompanyID::Invalid() if no face present. | |
| ErrorMessageData::ErrorMessageData | ( | EncodedString && | summary_msg, |
| EncodedString && | detailed_msg, | ||
| bool | is_critical = false, | ||
| int | x = 0, | ||
| int | y = 0, | ||
| EncodedString && | extra_msg = {}, | ||
| CompanyID | company = CompanyID::Invalid() ) |
Display an error message in a window.
| summary_msg | General error message showed in first line. Must be valid. |
| detailed_msg | Detailed error message showed in second line. Can be empty. |
| is_critical | Whether the error is critical. Critical messages never go away on their own. |
| x | World X position (TileVirtX) of the error location. Set both x and y to 0 to just center the message when there is no related error tile. |
| y | World Y position (TileVirtY) of the error location. Set both x and y to 0 to just center the message when there is no related error tile. |
| extra_msg | Extra error message showed in third line. Can be empty. |
| company | The associated company to the error message. Company::Invalid() when there is none. |
Definition at line 83 of file error_gui.cpp.
References company, detailed_msg, extra_msg, is_critical, position, and summary_msg.
|
inline |
|
protected |
Company belonging to the face being shown. CompanyID::Invalid() if no face present.
Definition at line 38 of file error.h.
Referenced by ErrmsgWindow::DrawWidget(), ErrorMessageData(), ErrmsgWindow::GetWidgetString(), HasFace(), and ErrmsgWindow::OnInvalidateData().
|
protected |
Detailed error message showed in second line. Can be INVALID_STRING_ID.
Definition at line 35 of file error.h.
Referenced by ErrmsgWindow::DrawWidget(), ErrorMessageData(), and ErrmsgWindow::UpdateWidgetSize().
|
protected |
Extra error message shown in third line. Can be INVALID_STRING_ID.
Definition at line 36 of file error.h.
Referenced by ErrmsgWindow::DrawWidget(), ErrorMessageData(), and ErrmsgWindow::UpdateWidgetSize().
|
protected |
Whether the error message is critical.
Definition at line 33 of file error.h.
Referenced by ErrorMessageData(), ErrmsgWindow::IsCritical(), ErrmsgWindow::OnMouseLoop(), and ErrmsgWindow::OnPaint().
|
protected |
Position of the error message window.
Definition at line 37 of file error.h.
Referenced by ErrorMessageData(), and ErrmsgWindow::OnInitialPosition().
|
protected |
General error message showed in first line. Must be valid.
Definition at line 34 of file error.h.
Referenced by ErrmsgWindow::DrawWidget(), ErrorMessageData(), and ErrmsgWindow::UpdateWidgetSize().