OpenTTD Source
20240917-master-g9ab0a47812
|
Point position
Position of the error message window.
void ShowFirstError()
Show the first error of the queue.
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.
void ShowErrorMessage(StringID summary_msg, int x, int y, CommandCost cc)
Display an error message in a window.
void SetDParamStr(uint n, const char *str)
Set a rawstring parameter.
WarningLevel
Message severity/type.
@ WL_WARNING
Other information.
void ScheduleErrorMessage(ErrorList &datas)
Schedule a list of errors.
@ INVALID_COMPANY
An invalid company.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Owner
Enum for all companies/owners.
std::list< ErrorMessageData > ErrorList
Define a queue with errors.
bool is_critical
Whether the error message is critical.
std::vector< StringParameterData > params
Backup of parameters of the message strings.
void CopyOutDParams()
Copy error parameters from current DParams.
bool HideActiveErrorMessage()
Close active error message window.
void ClearErrorMessages()
Clear all errors from the queue.
void SetDParam(uint n, uint64_t v)
Set a error string parameter.
Common return value for all commands.
@ WL_INFO
Used for DoCommand-like (and some non-fatal AI GUI) errors/information.
The data of the error message.
Coordinates of a point in 2D.
CompanyID face
Company belonging to the face being shown. INVALID_COMPANY if no face present.
bool HasFace() const
Check whether error window shall display a company manager face.
StringID detailed_msg
Detailed error message showed in second line. Can be INVALID_STRING_ID.
void UnshowCriticalError()
Unshow the critical error.
@ WL_ERROR
Errors (eg. saving/loading failed)
uint32_t textref_stack[16]
Values to put on the TextRefStack for the error message.
StringID extra_msg
Extra error message shown in third line. Can be INVALID_STRING_ID.
static const StringID INVALID_STRING_ID
Constant representing an invalid string (16bit in case it is used in savegames)
Dynamic data of a loaded NewGRF.
@ WL_CRITICAL
Critical errors, the MessageBox is shown in all cases.
StringID summary_msg
General error message showed in first line. Must be valid.
ErrorMessageData(const ErrorMessageData &data)
Copy the given data into our instance.