The data of the error message. More...
#include <error.h>
Public Member Functions | |
| ErrorMessageData (const ErrorMessageData &data) | |
| Copy the given data into our instace. | |
| ~ErrorMessageData () | |
| Free all the strings. | |
| ErrorMessageData (StringID summary_msg, StringID detailed_msg, uint duration=0, int x=0, int y=0, uint textref_stack_size=0, const uint32 *textref_stack=NULL) | |
| Display an error message in a window. | |
| 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. | |
| 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. | |
The data of the error message.
Definition at line 28 of file error.h.
| ErrorMessageData::ErrorMessageData | ( | const ErrorMessageData & | data | ) |
Copy the given data into our instace.
| data | The data to copy. |
Definition at line 73 of file error_gui.cpp.
References decode_params, lengthof, and strings.
| ErrorMessageData::~ErrorMessageData | ( | ) |
Free all the strings.
Definition at line 85 of file error_gui.cpp.
| ErrorMessageData::ErrorMessageData | ( | StringID | summary_msg, | |
| StringID | detailed_msg, | |||
| uint | duration = 0, |
|||
| int | x = 0, |
|||
| int | y = 0, |
|||
| 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_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 100 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 144 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 154 of file error_gui.cpp.
References free(), and strings.
Referenced by IniLoadSettings(), and StringToVal().
1.7.1