OpenTTD Source: src/news_gui.h File Reference

OpenTTD Source 15.3

Functions
news_gui.h File Reference

GUI functions related to the news. More...

`#include "news_type.h"`

Go to the source code of this file.

## Functions
void | ShowLastNewsMessage ()
| Show previous news item.
void | ShowMessageHistory ()
| Display window with news messages history.
bool | HideActiveNewsMessage ()
| Close active news message window.
const NewsContainer & | GetNews ()
| Get read-only reference to all news items.

## Detailed Description

GUI functions related to the news.

Definition in file news_gui.h.

## Function Documentation

## ◆ GetNews()

const NewsContainer & GetNews | ( |  | ) |

Get read-only reference to all news items.

Returns
  Read-only reference to all news items.

Definition at line 79 of file news_gui.cpp.

References _news.

Referenced by SurveyRecentNews().

## ◆ HideActiveNewsMessage()

bool HideActiveNewsMessage | ( |  | ) |

Close active news message window.

Returns
  true if a window was closed.

Definition at line 1129 of file news_gui.cpp.

References Window::Close(), FindWindowById(), and WC_NEWS_WINDOW.

Referenced by MainWindow::OnHotkey().

## ◆ ShowLastNewsMessage()

void ShowLastNewsMessage | ( |  | ) |

Show previous news item.

Definition at line 1138 of file news_gui.cpp.

References _current_news, _forced_news, _news, _news_type_data, FindWindowById(), NewsTypeData::GetDisplay(), Off, ShowNewsMessage(), to_underlying(), and WC_NEWS_WINDOW.

Referenced by MenuClickNewspaper(), and StatusBarWindow::OnClick().

## ◆ ShowMessageHistory()

void ShowMessageHistory | ( |  | ) |

Display window with news messages history.

Definition at line 1303 of file news_gui.cpp.

References CloseWindowById(), and WC_MESSAGE_HISTORY.

Referenced by MenuClickNewspaper().