mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(svn r17200) -Codechange: Initialize NewsWindow::duration, add some documentation strings.
This commit is contained in:
parent
3409385e1d
commit
66e98469bb
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user