@@ -181,25 +181,24 @@ enum NewsTypeWidgets {
/** Window class displaying a news item. */
struct NewsWindow : Window {
uint16 chat_height; ///< Height of the chat window.
NewsItem *ni; ///< News item to display.
static uint duration; ///< Remaining time for showing current news message (may only be accessed while a news item is displayed).
NewsWindow(const WindowDesc *desc, NewsItem *ni) : Window(desc), ni(ni)
{
NewsWindow::duration = 555;
const Window *w = FindWindowById(WC_SEND_NETWORK_MSG, 0);
this->chat_height = (w != NULL) ? w->height : 0;
this->ni = _forced_news == NULL ? _current_news : _forced_news;
this->flags4 |= WF_DISABLE_VP_SCROLL;
this->FindWindowPlacementAndResize(desc);
}
void DrawNewsBorder()
int left = 0;
int right = this->width - 1;
int top = 0;
int bottom = this->height - 1;