Add support for adding a third error line to the error GUI

Add support for a second error string ID to CommandCost
This commit is contained in:
Jonathan G Rennison
2018-11-19 18:59:25 +00:00
parent 6df12e77b6
commit 989577d40c
4 changed files with 56 additions and 8 deletions

View File

@@ -37,13 +37,14 @@ protected:
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.
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.
public:
ErrorMessageData(const ErrorMessageData &data);
~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);
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, StringID extra_msg = INVALID_STRING_ID);
/** Check whether error window shall display a company manager face */
bool HasFace() const { return face != INVALID_COMPANY; }
@@ -56,7 +57,7 @@ public:
void ScheduleErrorMessage(const ErrorMessageData &data);
void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel wl, int x = 0, int y = 0, const GRFFile *textref_stack_grffile = NULL, uint textref_stack_size = 0, const uint32 *textref_stack = NULL);
void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel wl, int x = 0, int y = 0, const GRFFile *textref_stack_grffile = NULL, uint textref_stack_size = 0, const uint32 *textref_stack = NULL, StringID extra_msg = INVALID_STRING_ID);
void ClearErrorMessages();
void ShowFirstError();
void UnshowCriticalError();