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

Method GetStatusText

src/news_gui.cpp:877–886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

875}
876
877std::string NewsItem::GetStatusText() const
878{
879 if (this->data != nullptr) {
880 /* CompanyNewsInformation is the only type of additional data used. */
881 const CompanyNewsInformation &cni = *static_cast<const CompanyNewsInformation*>(this->data.get());
882 return GetString(STR_MESSAGE_NEWS_FORMAT, cni.title, this->headline.GetDecodedString());
883 }
884
885 return this->headline.GetDecodedString();
886}
887
888/**
889 * Add a new newsitem to be shown.

Callers 3

DrawScrollingStatusTextFunction · 0.80
DrawNewsStringFunction · 0.80
SurveyRecentNewsFunction · 0.80

Calls 3

GetDecodedStringMethod · 0.80
GetStringFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected