MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetDisplay

Method GetDisplay

src/news_gui.cpp:348–353  ·  view source on GitHub ↗

* Return the news display option. * @return display options */

Source from the content-addressed store, hash-verified

346 * @return display options
347 */
348NewsDisplay NewsTypeData::GetDisplay() const
349{
350 const SettingDesc *sd = GetSettingFromName(this->name);
351 assert(sd != nullptr && sd->IsIntSetting());
352 return static_cast<NewsDisplay>(sd->AsIntSetting()->Read(nullptr));
353}
354
355/** Window class displaying a news item. */
356struct NewsWindow : Window {

Callers 3

MoveToNextTickerItemFunction · 0.80
MoveToNextNewsItemFunction · 0.80
ShowLastNewsMessageFunction · 0.80

Calls 4

GetSettingFromNameFunction · 0.85
AsIntSettingMethod · 0.80
IsIntSettingMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected