|
OpenTTD Source
14.0-beta3
|
The data of the error message. More...
#include <error.h>
Public Member Functions | |
| ErrorMessageData (const ErrorMessageData &data) | |
| Copy the given data into our instance. More... | |
| ErrorMessageData (StringID summary_msg, StringID detailed_msg, bool is_critical=false, int x=0, int y=0, const GRFFile *textref_stack_grffile=nullptr, uint textref_stack_size=0, const uint32_t *textref_stack=nullptr, StringID extra_msg=INVALID_STRING_ID) | |
| Display an error message in a window. More... | |
| ErrorMessageData & | operator= (ErrorMessageData &rhs)=delete |
| bool | HasFace () const |
| Check whether error window shall display a company manager face. | |
| void | SetDParam (uint n, uint64_t v) |
| Set a error string parameter. More... | |
| void | SetDParamStr (uint n, const char *str) |
| Set a rawstring parameter. More... | |
| void | SetDParamStr (uint n, const std::string &str) |
| Set a rawstring parameter. More... | |
| void | CopyOutDParams () |
| Copy error parameters from current DParams. | |
Protected Attributes | |
| bool | is_critical |
| Whether the error message is critical. | |
| std::vector< StringParameterBackup > | params |
| Backup of parameters of the message strings. | |
| const GRFFile * | textref_stack_grffile |
| NewGRF that filled the TextRefStack for the error message. | |
| uint | textref_stack_size |
| Number of uint32_t values to put on the TextRefStack for the error message. | |
| uint32_t | textref_stack [16] |
| Values to put on the TextRefStack for the error message. | |
| StringID | summary_msg |
| General error message showed in first line. Must be valid. | |
| StringID | detailed_msg |
| Detailed error message showed in second line. Can be INVALID_STRING_ID. | |
| StringID | extra_msg |
| Extra error message shown in third line. Can be INVALID_STRING_ID. | |
| Point | position |
| Position of the error message window. | |
| CompanyID | face |
| Company belonging to the face being shown. INVALID_COMPANY if no face present. | |
| ErrorMessageData::ErrorMessageData | ( | const ErrorMessageData & | data | ) |
Copy the given data into our instance.
| data | The data to copy. |
Definition at line 77 of file error_gui.cpp.
References textref_stack.
| ErrorMessageData::ErrorMessageData | ( | StringID | summary_msg, |
| StringID | detailed_msg, | ||
| bool | is_critical = false, |
||
| int | x = 0, |
||
| int | y = 0, |
||
| const GRFFile * | textref_stack_grffile = nullptr, |
||
| uint | textref_stack_size = 0, |
||
| const uint32_t * | textref_stack = nullptr, |
||
| StringID | extra_msg = INVALID_STRING_ID |
||
| ) |
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 INVALID_STRING_ID. |
| 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. |
| textref_stack_grffile | NewGRF that provides the TextRefStack for the error message. |
| textref_stack_size | Number of uint32_t values to put on the TextRefStack for the error message; 0 if the TextRefStack shall not be used. |
| textref_stack | Values to put on the TextRefStack. |
| extra_msg | Extra error message showed in third line. Can be INVALID_STRING_ID. |
Definition at line 96 of file error_gui.cpp.
| void ErrorMessageData::SetDParam | ( | uint | n, |
| uint64_t | v | ||
| ) |
Set a error string parameter.
| n | Parameter index |
| v | Parameter value |
Definition at line 135 of file error_gui.cpp.
References params.
| void ErrorMessageData::SetDParamStr | ( | uint | n, |
| const char * | str | ||
| ) |
Set a rawstring parameter.
| n | Parameter index |
| str | Raw string |
Definition at line 146 of file error_gui.cpp.
References params.
Referenced by IntSettingDesc::ParseValue(), BoolSettingDesc::ParseValue(), OneOfManySettingDesc::ParseValue(), ManyOfManySettingDesc::ParseValue(), and ListSettingDesc::ParseValue().
| void ErrorMessageData::SetDParamStr | ( | uint | n, |
| const std::string & | str | ||
| ) |
Set a rawstring parameter.
| n | Parameter index |
| str | Raw string |
Definition at line 157 of file error_gui.cpp.
References params.