diff options
author | alberth <alberth@openttd.org> | 2009-08-16 08:59:56 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-08-16 08:59:56 +0000 |
commit | 66e98469bb5dbdcfc9f5ffabb6619c5ada6bacdc (patch) | |
tree | 2dd63ec3f9b12f87723976be14fff0795c823274 | |
parent | 3409385e1d6c3ccd213ccce5f079026b6535cb03 (diff) | |
download | openttd-66e98469bb5dbdcfc9f5ffabb6619c5ada6bacdc.tar.xz |
(svn r17200) -Codechange: Initialize NewsWindow::duration, add some documentation strings.
-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; } /** |