File diff r27165:ea28ecab6159 → r27166:64e04a3ef9b1
src/news_type.h
Show inline comments
 
@@ -8,13 +8,13 @@
 
/** @file news_type.h Types related to news. */
 

	
 
#ifndef NEWS_TYPE_H
 
#define NEWS_TYPE_H
 

	
 
#include "core/enum_type.hpp"
 
#include "date_type.h"
 
#include "timer/timer_game_calendar.h"
 
#include "strings_type.h"
 
#include "sound_type.h"
 

	
 
/**
 
 * Type of news.
 
 */
 
@@ -121,23 +121,23 @@ struct NewsAllocatedData {
 
	virtual ~NewsAllocatedData() {}
 
};
 

	
 

	
 
/** Information about a single item of news. */
 
struct NewsItem {
 
	NewsItem *prev;              ///< Previous news item
 
	NewsItem *next;              ///< Next news item
 
	StringID string_id;          ///< Message text
 
	Date date;                   ///< Date of the news
 
	NewsType type;               ///< Type of the news
 
	NewsFlag flags;              ///< NewsFlags bits @see NewsFlag
 
	NewsItem *prev;               ///< Previous news item
 
	NewsItem *next;               ///< Next news item
 
	StringID string_id;           ///< Message text
 
	TimerGameCalendar::Date date; ///< Date of the news
 
	NewsType type;                ///< Type of the news
 
	NewsFlag flags;               ///< NewsFlags bits @see NewsFlag
 

	
 
	NewsReferenceType reftype1;  ///< Type of ref1
 
	NewsReferenceType reftype2;  ///< Type of ref2
 
	uint32 ref1;                 ///< Reference 1 to some object: Used for a possible viewport, scrolling after clicking on the news, and for deleting the news when the object is deleted.
 
	uint32 ref2;                 ///< Reference 2 to some object: Used for scrolling after clicking on the news, and for deleting the news when the object is deleted.
 
	NewsReferenceType reftype1;   ///< Type of ref1
 
	NewsReferenceType reftype2;   ///< Type of ref2
 
	uint32 ref1;                  ///< Reference 1 to some object: Used for a possible viewport, scrolling after clicking on the news, and for deleting the news when the object is deleted.
 
	uint32 ref2;                  ///< Reference 2 to some object: Used for scrolling after clicking on the news, and for deleting the news when the object is deleted.
 

	
 
	std::unique_ptr<const NewsAllocatedData> data; ///< Custom data for the news item that will be deallocated (deleted) when the news item has reached its end.
 

	
 
	uint64 params[10]; ///< Parameters for string resolving.
 

	
 
	NewsItem(StringID string_id, NewsType type, NewsFlag flags, NewsReferenceType reftype1, uint32 ref1, NewsReferenceType reftype2, uint32 ref2, const NewsAllocatedData *data);