| OpenTTD
    | 
The data of the error message. More...
#include <error.h>
 
  
 | Public Member Functions | |
| ErrorMessageData (const ErrorMessageData &data) | |
| Copy the given data into our instance. | |
| ~ErrorMessageData () | |
| Free all the strings. | |
| ErrorMessageData (StringID summary_msg, StringID detailed_msg, uint duration=0, int x=0, int y=0, const GRFFile *textref_stack_grffile=NULL, uint textref_stack_size=0, const uint32 *textref_stack=NULL) | |
| Display an error message in a window. | |
| bool | HasFace () const | 
| Check whether error window shall display a company manager face. | |
| void | SetDParam (uint n, uint64 v) | 
| Set a error string parameter. | |
| void | SetDParamStr (uint n, const char *str) | 
| Set a rawstring parameter. | |
| void | CopyOutDParams () | 
| Copy error parameters from current DParams. | |
| Protected Attributes | |
| uint | duration | 
| Length of display of the message. 0 means forever,. | |
| uint64 | decode_params [20] | 
| Parameters of the message strings. | |
| const char * | strings [20] | 
| Copies of raw strings that were used. | |
| const GRFFile * | textref_stack_grffile | 
| NewGRF that filled the TextRefStack for the error message. | |
| uint | textref_stack_size | 
| Number of uint32 values to put on the TextRefStack for the error message. | |
| uint32 | 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. | |
| 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 75 of file error_gui.cpp.
References decode_params, lengthof, stredup(), and strings.
| ErrorMessageData::~ErrorMessageData | ( | ) | 
Free all the strings.
Definition at line 87 of file error_gui.cpp.
| ErrorMessageData::ErrorMessageData | ( | StringID | summary_msg, | 
| StringID | detailed_msg, | ||
| uint | duration = 0, | ||
| int | x = 0, | ||
| int | y = 0, | ||
| const GRFFile * | textref_stack_grffile = NULL, | ||
| uint | textref_stack_size = 0, | ||
| const uint32 * | textref_stack = NULL | ||
| ) | 
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. | 
| duration | The amount of time to show this error message. | 
| 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 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. | 
Definition at line 103 of file error_gui.cpp.
References decode_params, INVALID_STRING_ID, MemCpyT(), position, and strings.
| void ErrorMessageData::SetDParam | ( | uint | n, | 
| uint64 | v | ||
| ) | 
Set a error string parameter.
| n | Parameter index | 
| v | Parameter value | 
Definition at line 148 of file error_gui.cpp.
References decode_params.
| void ErrorMessageData::SetDParamStr | ( | uint | n, | 
| const char * | str | ||
| ) | 
Set a rawstring parameter.
| n | Parameter index | 
| str | Raw string | 
Definition at line 158 of file error_gui.cpp.
References free(), stredup(), and strings.
Referenced by IniLoadSettings(), openttd_main(), and StringToVal().
 1.8.1.2
 1.8.1.2