src/news_gui.cpp
branchnoai
changeset 9601 b499fdd106d5
parent 9574 698395509d12
child 7038 60b0e082723c
equal deleted inserted replaced
9600:59cc173953ae 9601:b499fdd106d5
   238 /** Add a new newsitem to be shown.
   238 /** Add a new newsitem to be shown.
   239  * @param string String to display, can have special values based on parameter 'flags'
   239  * @param string String to display, can have special values based on parameter 'flags'
   240  * @param flags various control bits that will show various news-types. See macro NEWS_FLAGS()
   240  * @param flags various control bits that will show various news-types. See macro NEWS_FLAGS()
   241  * @param data_a news-specific value based on news type
   241  * @param data_a news-specific value based on news type
   242  * @param data_b news-specific value based on news type
   242  * @param data_b news-specific value based on news type
   243  * @note flags exists of 4 byte-sized extra parameters.<br/>
   243  * @note flags exists of 4 byte-sized extra parameters.
   244  * 1.  0 -  7 display_mode, any of the NewsMode enums (NM_)<br/>
   244  * 1.  0 -  7 display_mode, any of the NewsMode enums (NM_)
   245  * 2.  8 - 15 news flags, any of the NewsFlags enums (NF_) NF_INCOLOR are set automatically if needed<br/>
   245  * 2.  8 - 15 news flags, any of the NewsFlags enums (NF_) NF_INCOLOR are set automatically if needed
   246  * 3. 16 - 23 news category, any of the NewsType enums (NT_)<br/>
   246  * 3. 16 - 23 news category, any of the NewsType enums (NT_)
   247  * 4. 24 - 31 news callback function, any of the NewsCallback enums (DNC_)<br/>
   247  * 4. 24 - 31 news callback function, any of the NewsCallback enums (DNC_)
   248  * If the display mode is NM_CALLBACK special news is shown and parameter
   248  * If the display mode is NM_CALLBACK special news is shown and parameter
   249  * stringid has a special meaning.<br/>
   249  * stringid has a special meaning.
   250  * DNC_TRAINAVAIL, DNC_ROADAVAIL, DNC_SHIPAVAIL, DNC_AIRCRAFTAVAIL: StringID is
   250  * DNC_TRAINAVAIL, DNC_ROADAVAIL, DNC_SHIPAVAIL, DNC_AIRCRAFTAVAIL: StringID is
   251  * the index of the engine that is shown<br/>
   251  * the index of the engine that is shown
   252  * DNC_BANKRUPCY: bytes 0-3 of StringID contains the player that is in trouble,
   252  * DNC_BANKRUPCY: bytes 0-3 of StringID contains the player that is in trouble,
   253  * and 4-7 contains what kind of bankrupcy message is shown, NewsBankrupcy enum (NB_)<br/>
   253  * and 4-7 contains what kind of bankrupcy message is shown, NewsBankrupcy enum (NB_)
   254  * @see NewsMode
   254  * @see NewsMode
   255  * @see NewsFlags
   255  * @see NewsFlags
   256  * @see NewsType
   256  * @see NewsType
   257  * @see NewsCallback */
   257  * @see NewsCallback */
   258 void AddNewsItem(StringID string, uint32 flags, uint data_a, uint data_b)
   258 void AddNewsItem(StringID string, uint32 flags, uint data_a, uint data_b)