diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/news_gui.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp index fe7d4ceea..7f3fe4294 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -178,10 +178,11 @@ enum NewsTypeWidgets { NTW_VIEWPORT, ///< Viewport in window. Only used in type0-news. }; +/** Window class displaying a news item. */ struct NewsWindow : Window { - uint16 chat_height; - NewsItem *ni; - static uint duration; + 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) { @@ -325,7 +326,7 @@ struct NewsWindow : Window { } }; -/* static */ uint NewsWindow::duration; ///< Remaining time for showing current news message +/* static */ uint NewsWindow::duration = 0; // Instance creation. static const Widget _normal_news_widgets[] = { @@ -470,6 +471,7 @@ void InitNewsItemStructs() _latest_news = NULL; _forced_news = NULL; _current_news = NULL; + NewsWindow::duration = 0; } /** |