|
| const int | getNextNewsID (NewsType type) |
| | News are stored in an array, it would iterate to the next one when calling this function and would go back to the first one when the iteration ends. More...
|
| |
|
const core::stringw | getCurrentNewsMessage (NewsType type) |
| | Returns the message pointed by the current ptr.
|
| |
|
const std::string | getCurrentNewsDate (NewsType type) |
| | Returns the date of the news pointed by the current ptr.
|
| |
|
const std::string | getCurrentNewsLink (NewsType type) |
| | Returns the date of the news pointed by the current ptr.
|
| |
|
const bool | isCurrentNewsImportant (NewsType type) |
| | Returns the importance of the message pointed by the current ptr.
|
| |
|
const int | getNewsCount (NewsType type) |
| |
|
void | prioritizeNewsAfterID (NewsType type, int id) |
| | Set id = -1 to disable it.
|
| |
| void | init (bool force_refresh) |
| | This function initialises the data for the news manager. More...
|
| |
| void | addNewsMessage (NewsType type, const core::stringw &s) |
| | Add a news message. More...
|
| |
|
void | resetNewsPtr (NewsType type) |
| | Goes back to the place before first message when called.
|
| |
|
bool | isNewsFetching (NewsType type) |
| | Check if this type of news is on the way of fetching.
|
| |
|
void | setErrorMessage (const core::stringw &s) |
| | Sets an error message that is displayed instead of any news message.
|
| |
|
void | clearErrorMessage () |
| | Clears the error message.
|
| |
|
void | joinDownloadThreadIfExit () |
| |
|
| CanBeDeleted () |
| | Set this instance to be not ready to be deleted.
|
| |
|
void | setCanBeDeleted () |
| | Sets this instance to be ready to be deleted.
|
| |
|
void | resetCanBeDeleted () |
| |
|
bool | canBeDeletedNow () |
| |
| bool | waitForReadyToDeleted (float waiting_time) |
| | Waits at most t seconds for this class to be ready to be deleted. More...
|
| |
|
|
Synchronised< std::vector< NewsMessage > > | m_news [NTYPE_COUNT] |
| | m_news[NewsType] means all news within this type.
|
| |
|
int | m_current_news_ptr [NTYPE_COUNT] |
| | Index of the current news message that is being displayed.
|
| |
|
int | m_news_prioritize_after_id [NTYPE_COUNT] |
| | News after this ID would be shown on the top regardless of importance.
|
| |
|
std::vector< int > | m_saved_display_count |
| | Stores the news message display count from the user config file.
|
| |
|
Synchronised< core::stringw > | m_error_message |
| | A high priority error message that is shown instead of any news message (usually indicating connection problems).
|
| |
|
bool | m_force_refresh |
| | True when all .xml files should be re-downloaded.
|
| |
|
std::thread | m_download_thread |
| |
| const int NewsManager::getNextNewsID |
( |
NewsType |
type | ) |
|
News are stored in an array, it would iterate to the next one when calling this function and would go back to the first one when the iteration ends.
Returns the next loaded news message.
It will 'wrap around', i.e. if there is only one message it will be returned over and over again. To be used by the the main menu to get the next news message after one message was scrolled off screen.