Add: News menu entry and shortcut for deleting all messages. (#7240)
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "framerate_type.h"
|
||||
#include "network/network_func.h"
|
||||
#include "guitimer_func.h"
|
||||
#include "news_func.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
@@ -3370,6 +3371,17 @@ restart_search:
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all messages and their corresponding window (if any).
|
||||
*/
|
||||
void DeleteAllMessages()
|
||||
{
|
||||
InitNewsItemStructs();
|
||||
InvalidateWindowData(WC_STATUS_BAR, 0, SBI_NEWS_DELETED); // invalidate the statusbar
|
||||
InvalidateWindowData(WC_MESSAGE_HISTORY, 0); // invalidate the message history
|
||||
DeleteWindowById(WC_NEWS_WINDOW, 0); // close newspaper or general message window if shown
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all windows that are used for construction of vehicle etc.
|
||||
* Once done with that invalidate the others to ensure they get refreshed too.
|
||||
|
Reference in New Issue
Block a user