OpenTTD Source  20240919-master-gdf0233f4c2
NewsTypeData Struct Reference

Per-NewsType data. More...

#include <news_type.h>

Public Member Functions

 NewsTypeData (const char *name, uint8_t age, SoundFx sound)
 Construct this entry. More...
 
NewsDisplay GetDisplay () const
 Return the news display option. More...
 

Data Fields

const char *const name
 Name.
 
const uint8_t age
 Maximum age of news items (in days)
 
const SoundFx sound
 Sound.
 

Detailed Description

Per-NewsType data.

Definition at line 100 of file news_type.h.

Constructor & Destructor Documentation

◆ NewsTypeData()

NewsTypeData::NewsTypeData ( const char *  name,
uint8_t  age,
SoundFx  sound 
)
inline

Construct this entry.

Parameters
nameThe name of the type.
ageThe maximum age for these messages.
soundThe sound to play.

Definition at line 111 of file news_type.h.

Member Function Documentation

◆ GetDisplay()

NewsDisplay NewsTypeData::GetDisplay ( ) const

Return the news display option.

Returns
display options

Definition at line 273 of file news_gui.cpp.

References SettingDesc::AsIntSetting(), GetSettingFromName(), SettingDesc::IsIntSetting(), name, and IntSettingDesc::Read().

Referenced by ShowLastNewsMessage().


The documentation for this struct was generated from the following files: